We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12410
    • 353 Posts
    Hi Guys,
    whats the correct syntax for using a select/listbox in Migx. Below returns empty values in listbox.

    [
    
    {"caption":"Title", "fields":[{"field":"title","caption":"Title"}]},
    
    {"caption":"Text Content", "fields":[{"field":"richtextarea","caption":"Text Content","inputTVtype":"richtext"}]},
    
    {"caption":"Alert Type", "fields":[{"field":"color-select","caption":"Alert Type","inputTVtype":"listbox"}]}
    
    ]
    
    *******************************
    
    [
    
    {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
    
    {"header": "Text Content", "width": "160", "sortable": "true", "dataIndex": "richtextarea"},
    
    {"header": "Alert Type", "width": "160", "sortable": "true", "dataIndex": "color-select"}
    
    ]


    The listbox renders fine as a standalone field but fails in Migx . Input Option Values:

    Blue-Alert==0||Red-Alert==1||Yellow-Alert==2||Green-Alert==3


    Using latest Migx and Revo. Downloaded today. PHP Version 5.3.28

    Thanks [ed. note: howster last edited this post 12 years, 4 months ago.]
      • 12410
      • 353 Posts
      Ok if helps others this link pointed to the solution: http://stackoverflow.com/questions/21194735/how-to-make-a-radio-button-using-migx-extra-for-modx-revolution


      [
      
      {"caption":"Title", "fields":[{"field":"title","caption":"Title"}]},
      
      {"caption":"Text Content", "fields":[{"field":"richtextarea","caption":"Text Content","inputTVtype":"richtext"}]},
      
      {"caption":"Alert Type", "fields":[{"field":"color-select","caption":"Alert Type","inputTVtype":"listbox","inputOptionValues":"Blue Alert==info||Red Alert==danger||Yellow Alert==warning||Green Alert==success"}]}
      ]