hi guys,
Im having hard tim in figuring on how to add the attribute "id" on each option in my select box? here is my code.
<?php
self::$registration_form['select'] = new Select('select',
[ //select value
'male' => ['id' => 'opt1'],
'female' => ['id' => 'opt1']
],
[ //select class,id
'class' => 'form-control gender',
'id' => 'gender'
]
);
it gives me the output
<select id="gender" name="select" class="form-control gender">
<optgroup label="male">
<option value="id">opt1</option>
</optgroup>
<optgroup label="female">
<option value="id">opt1</option>
</optgroup>
</select>