adding data attribute to option value in Drupal 6 I have a form, like this:

        $form['my_case_type_list']=array(
            '#type'=&gt;'select',
            '#title' =&gt; 'Issue Type',
            '#options' =&gt; $my_list,
            '#multiple' =&gt; false,
            '#attributes'=&gt;array('size'=&gt;1),
            '#weight'=&gt;2,
        );


where $my_list is an array, like this:

$array[0] = 'string 1'
$array[1] = 'string 2'
$array[2] = 'string 3'


This renders a dropdown list with the array key as the option value and the array value as the option text.  I want to use a multi-dimensional array to also provide each option with a data id.  An array like this:

$return_array[0] = array('name' =&gt;'string 1', 'description'=&gt;'description for string 1');
$return_array[1] = array('name' =&gt;'string 2', 'description'=&gt;'description for string 2');
$return_array[2] = array('name' =&gt;'string 3', 'description'=&gt;'description for string 3');


and have the description field be used, in the option value, as a data attribute.  So, it would be rendered like this:

&lt;select name="my_case_type_list" size="1" class="form-select" id="edit-my-case-type-list"&gt;
    &lt;option data-desc='description for string 1' value="0"&gt;String 1&lt;/option&gt;
    &lt;option data-desc='description for string 2'  value="1"&gt;String 2&lt;/option&gt;
    &lt;option data-desc='description for string 3'  value="2"&gt;String 3&lt;/option&gt;
&lt;/select&gt;


Is this even possible?  Can you assign a multi-dim array to a form?  When I do, it just create option groups and each dimension of the array becomes an option.

thanks
jason
This has been asked previously for Drupal 7 and there is no great answer so it's unlikely to be possible in Drupal 6 the answer seems to be implementing a custom theme_select