[fw-general] Zend_Form retain select value=0 on invalid submission

2008-08-08 Thread maxarbos
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

Re: [fw-general] Zend_Form retain select value=0 on invalid submission

2008-07-29 Thread maxarbos
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

Re: [fw-general] Zend_Form retain select value=0 on invalid submission

2008-07-29 Thread Micah Gersten
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

Re: [fw-general] Zend_Form retain select value=0 on invalid submission

2008-07-29 Thread maxarbos
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