Reputation: 195
i try to set a style to a form_dropdown of codeigniter but is not wokrk. my code is:
<?php echo form_dropdown('week_id',$weeklist,'class ="form-control selectpicker"'); ?>
Also i try to use the html code with this class and work prefect so my external links of .css and .js are true. Any suggestions? Thanks in advance.
Upvotes: 1
Views: 542
Reputation: 2741
leave third argument empty.Put class in 4th argument it will work.
<?php echo form_dropdown('week_id',$weeklist,'','class ="form-control selectpicker"'); ?>
3rd argument is to pre select a value in select box and 4th is to add id and class etc. Refer Here
form_dropdown('shirts', $options, 'large', $js)
;
Upvotes: 3