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 > > 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 show first, that's why i was listing it > first. > So I guess the order of the values array options is important on 0/1 values. > > > > > > maxarbos wrote: > >> I have a form that has a select field with two values: 1 and 0. >> >> <select name="testfield"> >> <option value="1">Yes</option> >> <option value="0">No</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 >> default value listed in the form builder file. >> >> All other fields of the form, including the other select fields retain >> their values when there is no '0' value choosen. >> >> Any advice would be great. >> >> Thanks. >> >> >> > >
