We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7858
    • 97 Posts
    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
      • 7858
      • 97 Posts
      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...
        • 7858
        • 97 Posts
        got it

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