i use a form_dropdown to select a day to show some programs which are incluted at this day.My code is:
echo form_dropdown('date_id',$dayslist);
With this code after i press the submit button the dropdown displays the selected day. When i change my code and add code for css class like this:
echo form_dropdown('date_id',$dayslist,'','class ="form-control selectpicker" data-style="btn-default"');
the dropdown form displays the day that return at first time from the database instead the selected day. Any solution about this? Thanks in advance.
i have change my code to:
echo form_dropdown('date_id',$dayslist,array(),'class ="form-control selectpicker" data-style="btn-default"');
Instead of:
echo form_dropdown('date_id',$dayslist,'','class ="form-control selectpicker" data-style="btn-default"');
and it is work perfect
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.