MIGX - pulling TV values into single listbox from another TV already existing

Summary

Long story short, i want to display values in MIGX single listbox from another listbox TV (not from MIGX but from normal TV “creator”).

Step to reproduce

I have following config:

"fields":[
        {
          "MIGX_id":2,
          "field":"work_category",
          "caption":"Work Category",
          "description":"",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"listbox",
          "validation":"required",
          "configs":{
            "valueListFrom":"wpCategories"
          },
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":1
        },

Found somewhere on the internet that:

"configs":{
            "valueListFrom":"wpCategories"
          },

this part should do the job wpCategories is TV from which i want to pull values.

am I doing something wrong? I can’t confirm if the following method is allowed…
Would be nice if somebody with better knowledge could have a look on that.

Alternatively i can use custom @SNIPPET in values but don’t want to duplicate code if i don’t have to.

THANKS GUYS!

Environment

MODX 3.0.4, MIGX3.0.2-beta1

Can’t you just set inputTV to the listbox TV (and leave inputTVtype empty)?

"inputTV":"wpCategories",
"inputTVtype":"",
...
1 Like

O wow works like a charm!
thank you so much.

By the way, do you know any good documentation about MIGX? I have been searching everywhere and could not find anything bigger than a thread/topic on some forums etc…

There exists no comprehensive documentation of MIGX as far as I know.

There is some information on this page. There are some MIGX tutorials in the official MODX documentation that mostly cover some specific use cases.

I made a few videos about MIGX on Youtube. But these videos are mostly about MIGXdb and the additional challenges when dealing with database tables.

Most information about MIGX is scattered in different forum topics and you have to search for it. Or create a new topic if you have a specific question.

1 Like

Thank you very much for sharing these.
Indeed could not find full docs.
Again, thanks a lot for all!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.