We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    The setting of single select listbox options works fine in the general case, but isn't working for me from within MigX.

    I just have the following:

    Component TV:
    Name: test_single_select
    Category: mycategory
    Input type: listbox (single-select)
    Input option values: Test1||Test2||Test3

    MigX TV:
    Category: mycategory
    Input type: migx
    Form tabs: ... {"field":"test_single_select", "caption":"TEST", "inputTVtype":"listbox"}, ...

    Resulting box has no entries showing up in the pulldown; what am I missing/doing wrong?

    (MigX is 2.6.8, within ModX 2.2.14)

    Thanks for any help!

    This question has been answered by Bruno17. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      {"field":"test_single_select", "caption":"TEST", "inputTVtype":"listbox","inputOptionValues":"Test1||Test2||Test3"}
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 47562
        • 113 Posts
        Thanks Bruno, I appreciate your help.

        I'm a bit surprised that it's not enough just to specify the options in the component TV, but the explanation/clarification makes perfect sense...

        Cheers.
          • 47562
          • 113 Posts
          And just to verify, if the list is coming from a snippet, I can use
          ... ,"inputOptionValues":"[[getSubpageList? ...]]"}
            • 4172
            • 5,888 Posts
            Quote from: pauhana at Jun 11, 2014, 03:29 PM
            Thanks Bruno, I appreciate your help.

            I'm a bit surprised that it's not enough just to specify the options in the component TV, but the explanation/clarification makes perfect sense...

            Cheers.

            the other way would be to use

            {"field":"test_single_select", "caption":"TEST", "inputTV":"test_single_select"}


            then all the configurations of that TV are used (type,input-options,default-value, other settings).
            This TV shouldn't be assigned to any Template then, because of possible conflicts.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 4172
              • 5,888 Posts
              Quote from: pauhana at Jun 11, 2014, 03:41 PM
              And just to verify, if the list is coming from a snippet, I can use
              ... ,"inputOptionValues":"[[getSubpageList? ...]]"}

              you can use TV-bindings like @SELECT, @EVAL or @CHUNK for input-option-values, just like with any other TV

              for example:

              @EVAL return $modx->runSnippet('getSubpageList',array('propertyA'=>'A','propertyB'=>'B'));


              or

              @CHUNK optionsChunk


              and have in your optinsChunk:

              [[getSubpageList? ...]]


                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 47562
                • 113 Posts
                Awesome. Thanks again for your help, Bruno.