$alergias],["multiple"=>true]); I h" /> $alergias],["multiple"=>true]); I h" /> $alergias],["multiple"=>true]); I h"/>

How to enter an id in a select multiple cakephp

39 Views Asked by At

I want to put an id to my select but I don't know how to do it.

echo $this->form->select("alergias2", ["Alergias"=>$alergias],["multiple"=>true]);

I have tried it as follows.

echo $this->form->select("alergias2", array('id'=> 'alergia'), ["Alergias"=>$alergias],["multiple"=>true]);
1

There are 1 best solutions below

0
daniellandete On BEST ANSWER

I solved it like this.

 echo $this->form->select("alergias2", ["Alergias"=>$alergias],["multiple"=>true , "id"=>"alergia"]);