Select options not loading when using callback function I am creating the select box form element as following 

$form['select-user-group'] = array(
       '#type' =&gt; 'select',
       '#title' =&gt; t('Select a group'),
       '#options' =&gt; select_user_dropdown_options(),      
       '#description' =&gt; t('Select a group to send the mail.'))


and am trying load the options for select box like follwing 

function select_user_dropdown_options(){
    db_set_active('drupal');
    $result = db_query("select * from {content_type_usergroup}");   
    $record = db_fetch_object($result);
    $str = '&lt;select&gt;&lt;option&gt;-- Select a user group--&lt;/option&gt;';
    while ($obj = db_fetch_object($result)) {
        $str .= '&lt;option&gt;'+$obj-&gt;field_p_group_name_value+'&lt;/option&gt;';
     }
     $str .='&lt;/select&gt;';
     return $str;
}



  But its not loading options to the select box , please help
Your select_user_dropdown_options() function needs to return an array of options, not a block of HTML. See the #options section of the Form API documentation -- you should find yourself re-reading that Form API page a lot.

Your array will be in the form

array(
  'group_1' =&gt; 'Group 1',
  'group_2' =&gt; 'Group 2',
);


A pedantic note -- I believe that's really a function call as opposed to a callback. That's fine; I mention it mostly because you don't include the parentheses when providing the names of callback functions.