I have a Zend_Form_Element_MultiSelect element. I would like the result to be something like this:
<select id="users" multiple="multiple" name="users[]">
<option value="1" class="role-1">User 1</option>
<option value="2" class="role-1">User 2</option>
<option value="3" class="role-2">User 3</option>
</select>
Is there a way to set class attributes for specific parameters? I could not find anything that would allow me to do this.
Edit: looking at Zend / View / Helper / FormSelect :: _ build, it doesn't seem like there is an automatic way to assign a class. I believe that the only way would be to create parameters in the view template.
source
share