use taxonomy terms as values for radio buttons by code I've built a function for select / checkboxes but I can't get it working for radio buttons.

/**
 * helper function to get taxonomy term options for select widget
 * @arguments 
 * @return array of select options for form
 */
function popover_get_tax_term_options($machine_name){
    //$options = array( '0' =&gt; '');

    $vid = taxonomy_vocabulary_machine_name_load($machine_name)-&gt;vid;

    $options_source = taxonomy_get_tree($vid);

    foreach($options_source as $item ) {
        $key = $item-&gt;tid;
        $value = $item-&gt;name;
        $options[$key] = $value;
    }

    return $options;
}


Calling this in a form hook works with: ( shows all terms )

$form['third']['field_functioncat'] = array(
    '#type' =&gt; 'checkboxes',
    '#title' =&gt; 'Functiecategorie',
    '#options' =&gt; popover_get_tax_term_options('functie_categorie'),
);


But when I call it with radio it doesn't work: ( only shows the title with 1 radio button )

 $form['third']['field_functioncat'] = array(
    '#type' =&gt; 'radio',
    '#title' =&gt; 'Functiecategorie',
    '#options' =&gt; popover_get_tax_term_options('functie_categorie'),
  );
#options


values must be in array: http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#options

example:

'#options' =&gt; array(
            0 =&gt; t('None'),
            1 =&gt; t('Team'),
            2 =&gt; t('Business'),
            3 =&gt; t('Talent'),
        ),