Hi all,
Using CakePHP, I created select-option form element with:
echo $form->select('items', $numeration , array('selected' => 0));
It creates selection box, but the first option is always empty.
How can I get rid of that empty option? I did not manage to do anything with showEmpty
option...
please help.... :-((
UPDATED:
cakephp code
echo $form->select('myOptions', array(1 => 'a', 2 => 'b', 3 => 'c'), array('empty'=>false));
creates next html:
<select id="myOptions" name="data[myOptions]">
<option selected="selected" value=""></option>
<option value="1">a</option>
<option value="2">b</option>
<option value="3">c</option>
</select>
what is wrong, and why do i have empty element?!