开发者

cakephp dropdownlist

this is the dropdown list link in my edit page when editing it selects the friend automatically, but i want it shows 'select your exiting friend' by default开发者_如何学编程(whenever the page loads)..

echo $form->input('PostCard.friend_id',array('label'=>__l('Friend Name List'),'empty'=>__l('Select Your Existing Friend'),'options'=>$friends));


You can override selected value: http://book.cakephp.org/view/199/options-selected

echo $form->input('PostCard.friend_id',array('label'=>_l('Friend Name List'),'empty'=>_l('Select Your Existing Friend'),'options'=>$friends, 'selected'=>false));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜