Does someone know how to add class to a select option in a view file ?
I have at the moment:
echo $this->Form->input(
'shelf_id',
array(
'options' => $Shelves,
'label'=> 'Etagère :',
'default' => $Place['Place']['shelf_id'],
'class'=>'form-control')
);
All my options element are like this :
<option value="1">Element</option>
But I want them to be like this :
<option value="1" class="myClass">Etagere 1</option>
Tks
Aucun commentaire:
Enregistrer un commentaire