Hi,
I tried to create a selection using following code:
SELECT({"name":"color_id"},
OPTION({"value":"red", "selected":compare("red",
result['color'])==0}, "Red"),
OPTION({"value":"blue", "selected":compare("blue",
result['color'])==0}, "Blue")
)
assume result['color']) == 'red'
The result is:
<select name="color_id">
<option selected="true" value="red">Red</option>
<option selected="false" value="blue">Blue</option>
</select>
which does not work.
Is there a convenient way to generate following code:
<select name="color_id">
<option selected value="red">Red</option>
<option value="blue">Blue</option>
</select>
Thanks