/ Published in: PHP
This problem occurs when there is a duplicated name for the first level item (optgroup) and a second level item (option). The rendered select will not contain the mentioned option unless you do the following...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// In the view... // example array ); echo $form->input('zone.id', array('options' => $zonesList, 'empty' => __('Elegàtu ciudad', true), 'class' => 'selectBox', 'showParents' => true ) ); // note the 'showParents' parameter
URL: http://cakephp.lighthouseapp.com/projects/42648/tickets/479-form-helper-select-optgroup