[Nitro] Select default value.
Aureliano Calvo
aurelianocalvo at yahoo.com.ar
Thu Sep 6 22:08:59 EDT 2007
> Dear devs,
>
> I would like your opinion on this problem, lets say I have this select
> field:
>
> <form>
> <select name="gender">
> <option value="??">--- No selection</option>
> <option value="1">Male</option>
> <option value="2">Femal</option>
> </select>
>
> I would like to allocate a 'special' value to the default options, that
> Nitro will 'ignore'. Ie if the user does not select
> any gender,
>
> request["gender"] == nil
>
> and not
>
> request["gender"] == "??" # <-- the special value
>
> any ideas, suggestions?
>
How about?
<form>
<select name="gender">
<option value="">--- No selection</option>
<option value="1">Male</option>
<option value="2">Femal</option>
</select>
and request["gender"] == ""
More information about the Nitro-general
mailing list