开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜