ZF2-338: FormSelect options with int values
Description
Hi there,
$id_sexe = new Element('id_sexe');
$id_sexe->setAttributes(array(
'type' => 'select'
'label' => 'gender',
'options' => array('man'=>1,'woman'=>2)
));
Doesn't generate correct output because values are "int" types. So maybe i should cast into string all values or change the following code :
https://github.com/zendframework/zf2/…
David
Comments
Posted by Chris Martin (cgmartin) on 2012-06-20T15:35:17.000+0000
My vote would be for changing the FormSelect code, changing that line to allow for other primitive types... something like:
Posted by Antoine Hedgecock (mac_nibblet) on 2012-06-21T16:15:41.000+0000
Sent a fix that allows all scalar values to be able to be used as option values