What is the format for "List" in the Select widget
I'm trying to make use of the "Select" widget, AKA dropdown picker. Does anyone know what format the list values need to be in? I can state that this is not it ["Value 1", "Value 2", "Value 3"]
I'm trying to make use of the "Select" widget, AKA dropdown picker. Does anyone know what format the list values need to be in? I can state that this is not it ["Value 1", "Value 2", "Value 3"]
Hi--
This stumped me for a while, too. Here's the general process:
1) Define an application parameter to store the menu contents as a JSON string
2) Bind the app parameter to the List field in your Select widget
3) Add a filter to convert the string to a proper data object using JSON.parse()
4) Enter the JSON for your menu choices in the app parameter

For the JSON data structure, you'll want an array of objects, where each object has the same field(s) specifying the values (and display values, if different). For example, here's a very simple menu:
[{"color":"Red"},{"color":"Green"},{"color":"Blue"}]
For this menu, set both the "Value" and "Display" fields to "color".
If you want the display text to be more descriptive, you can do something like this:
[{"color":"#FF0000","name":"Red"},{"color":"#00FF00","name":"Green"},{"color":"#0000FF","name":"Blue"}]
In this case, set the "Value" field to "color" and the "Display" field to "name". The menu will use the names, but will return the CSS color spec as the selected value.
--Clay
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.