开发者

cakephp dropdownlist

开发者 https://www.devze.com 2022-12-21 08:23 出处:网络
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)

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

精彩评论

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