Laravel setup bootstrap to select -


this simple select form , can not set bootstrap form-control.

{{ form::select('size', array('l' => 'large', 's' => 'small'),array('class'=>'form-control','style'=>'' )) }} 

you missing 1 argument select statement. structure should be:

public function select($name, $list = array(), $selected = null, $options = array()) 

so in case, should change to:

{{ form::select('size', array('l' => 'large', 's' => 'small'), null, array('class'=>'form-control','style'=>'' )) }} 

you can, instead of giving null third parameter, put 'l' or 's' make 1 of options default choice.

you can find more information form elements via laravel api:

laravel api formbuilder - click here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -