Reputation: 1089
Hi I am trying to make my dropdowns in Laravel look like the rest of the form fields, which are using form-control styles from bootstrap. Here is what I tried. I also tried wrapping the form in a div with the form control class but no luck.
{{ Form::select('company_id', $company_lists, ['class'=>'form-control']) }}
form-control works fine on selects, but not when using the lists as above (ie populating from the database). Any ideas? thank you
Upvotes: 0
Views: 122
Reputation: 2590
Your array containing the class is being passed as the default value for the select. (http://laravel.com/api/4.1/Illuminate/Html/FormBuilder.html#method_select)
Try changing it to:
{{ Form::select('company_id', $company_lists, null, ['class'=>'form-control']) }}
Upvotes: 2