1

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.

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.