On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi, if I add a migxdb config as a migxdb formtabs field - how can I get the id of the entry I'm currently editing?

    Eg I have a classes Brands and Brandcategories.

    I've got a config for each brand. And brandcategories config is nested as migxdb tv inside Brand formtabs. I need to get id of the Brand, i'm currently editing, as I add a brand categorie.

    Thanks
    • I've figured out how to get parent id into cmp settings to filter only relevant records. It's object_id. So I can put

      {"brand_id":"[[+object_id]]"}


      in 'where' and it works.

      Now I need to get parent's id into "columns" to save it as I add new record. I think, I need co_id, but what is the syntax? If I put something like [[+co_id]] to default value, it doesn't get the right value...
      • got it

        @EVAL return $modx->getOption('co_id',$_REQUEST,'undefined');