Laravel Form select disable first option -


i have code on view

{!! form::select('room', $rooms, input::old('room'), array('class' => 'form-control')) !!}

and on controller

$rooms = array('' => 'select room') + $rooms;

i wanted first option selected , disabled "select room". tried put in array , didn't work.

if want disable 1 option select list can in html this:

<select>   <option value="volvo" disabled>volvo</option>   <option value="saab">saab</option>   <option value="vw">vw</option>   <option value="audi">audi</option> </select> 

this disable first option disabled.

for reff. http://www.w3schools.com/tags/att_option_disabled.asp


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -