gammamatrix wrote:
> 
> I forgot to state in the last message:
> 
>         ->setIsArray(false) 
> 
> This is the key here to turn a field into a drop down select statement.
> The default creates an array based name select input which leads to a
> multi select input:
> 
> ->setIsArray(false) 
> 
> <select name="my_select_field" id="my_select_field">
> 
> ->setIsArray(true) 
> 
> <select name="my_select_field[]" id="my_select_field" multiple="multiple">
> 
> 

Ok, works now. But...

Shouldn't the element type decide about setting the attribute multiple?
Where's the sense in using Select or Multiselect if it _isArray decides
about? Prior the $_multiple variable of Zend_Form_Multiselect decided about
that.

IMHO Select should have a default false for isArray and Multiselect should
have a default true for _isArray. That would be ... for me at least...
expected behaviour.
I vote for adding protected $_isArray = false; to the class definition of
Zend_Form_Select.php and protected $_isArray = true; to
Zend_Form_Multiselect.php...
... or ...
to not let isArray decide about setting the multiple attribute but the
element type (select|multiselect).

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-select-element-always-multi--tp15889624s16154p15891113.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to