How can I add classes to a form option tag without JS? At the moment in Form API I can pass a keyed array like this
array(
'0' => 'option 0',
'1' => 'option 1',
)
and I'll get html like this
<option value="0">option 0</option>
<option value="1">option 1</option>
Is there a way to do something like this:
array(
array(
'value' => 0,
'text' => 'option 0',
'class' => 'bob 0',
),
array(
'value' => 1,
'text' => 'option 1',
'class' => 'bob 1',
),
)
and then get this
<option value="0" class="bob 0">option 0</option>
<option value="1" class="bob 1">option 1</option>