Form input type option problem
echo $this->Form->input('country', array('type' => 'select', 'options' => $country_l开发者_如何学Goist));
This generates a select box with all the countries. But I'd like the default to be empty. I looked into the manual and setting 'selected' => ''
does not work either.
Any ideas? Thanks
Try 'empty' => ''
in the options
array. You can also set it to any other value you'd like.
精彩评论