I have this dropdown i want to make it read only or disable
{{ Form::select('name[]',$names,$name : '' ,['class'=>'form-control name input_fields','readonly'=>true,'id'=>'name']) }}
tried disabled also
{{ Form::select('name[]',$names,$name : '' ,['class'=>'form-control name input_fields','disabled'=>true,'id'=>'name']) }}
but i want to disable options only the option that is pre-selected should be saved in database, using readonly i can change the dropdown and using disable i can’t get its value.
2
Answers
This worked for me
In form remove "
$names,$name : ''
" and run only with$names
arrayYou have to use a hidden input
Example based on your code ..