I have a form that has a select field with two values: 1 and 0.
select name=testfield
option value=1Yes/option
option value=0No/option
/select
When I submit the form and it is invalid, this select box does not remember
the value of this field. It always defaults to '1'. There is no
For a weird reason, I tried rearranging the order of the array of options
from
array_vals=array('1' = 'Active', '0'='Inactive');
TO:
array_vals=array('0' = 'Inactive', '1='Active');
and added the default value to the element instance and it works fine.
I wanted to make the 'Active' option
In a select dropdown, the default if none is specified is the first
option regardless of value.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
maxarbos wrote:
For a weird reason, I tried rearranging the order of the array of options
from
originally, when I had the values array set to; array_vals=array('0' =
'Inactive', '1='Active');
I had the default val set to 1 and if 'Inactive' was chosen, and then form
was invalid, when the from was rerendered, the value of that field was
always set to 'Active' (1).
Viewing the posted