Why are my radio buttons not displaying? I'm working on enhancing a search form on a site I inherited. I'm trying to add a radio button set to allow the user to narrow potential search results, but I cannot for the life of me get the radio buttons to display. The label displays, but the buttons themselves do not.

Here's the function in template.php:

function ismiv3point1_search_block_form($form) {
    $form['search_block_form']['#title'] = ''; 
    $form['search_block_form']['#value'] = 'Search mysite.org';

    $form['submit']['#type'] = 'markup'; 
    $form['submit']['#value'] = '&lt;input type="image" name="submit" value="Search the Site" src="/icons/search.png" alt="Search the Site" /&gt;';
    $form['submit']['#weight'] = 2;


    // this is the new field I'm trying to add  
    $form['image_switch'] = array(
        '#type' =&gt; 'radios',
        '#title' =&gt; t('Image Switch Radios'),
        '#prefix' =&gt; '&lt;br /&gt;&lt;span style="color:#fff"&gt;',
        '#suffix'   =&gt; '&lt;/span&gt;',
        '#weight' =&gt; '3',
        '#options' =&gt; array(
            1 =&gt; t('Images'),
            2 =&gt; t('All'),
        ),  
        '#default_value' =&gt; 1       
    );

    return '    
    &lt;div id="search-box" style="margin-top: 10px; margin-bottom: 0px;"&gt;'.drupal_render($form).'
        &lt;div id="search-loading"&gt;&lt;/div&gt;
        &lt;div id="current-type"&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/div&gt;
        &lt;ul class="content-types"&gt;
            &lt;li&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" class="relevance"&gt;Sort by relevance&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;';
}


Here's the rendered source:

&lt;form action="/"  accept-charset="UTF-8" method="post" id="search-block-form"&gt;
    &lt;div id="search-box" style="margin-top: 10px; margin-bottom: 0px;"&gt;
   &lt;div class="form-item form-text" id="edit-search-block-form-1-wrapper"&gt;
      &lt;input type="text" maxlength="128" name="search_block_form" id="edit-search-block-form-1" size="15" value="Search mysite.org" title="Enter the terms you wish to search for." class="form-text" /&gt;
   &lt;/div&gt;

   &lt;input type="image" name="submit" value="Search the Site" src="/icons/search.png" alt="Search the Site" /&gt;
   &lt;input type="hidden" name="form_build_id" id="form-17ad7cfea143f9acf10cca6602a02df0" value="form-17ad7cfea143f9acf10cca6602a02df0"  /&gt;
   &lt;input type="hidden" name="form_token" id="edit-search-block-form-form-token" value="65a199ea9da3f7a52ed4c2693012997b"  /&gt;
   &lt;input type="hidden" name="form_id" id="edit-search-block-form" value="search_block_form"  /&gt;

   &lt;br /&gt;
   &lt;span style="color:#fff"&gt; &lt;label&gt;Image Switch Radios&lt;/label&gt;
     &lt;div class="form-radios"&gt;&lt;/div&gt;
   &lt;/span&gt;
        &lt;div id="search-loading"&gt;&lt;/div&gt;
        &lt;div id="current-type"&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/div&gt;
        &lt;ul class="content-types"&gt;
            &lt;li&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" class="relevance"&gt;Sort by relevance&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/form&gt;


Any ideas? Is it because the field is being added after the submit? The reason for that is because the submit is a graphic (the magnifying glass) at the end of the search box; we want the radio buttons to be positioned below that.
Form builder functions must return a form array, not a string, otherwise they won't work with drupal_get_form(). If you need to add markup before and after the form you you should use the #prefix and #suffix properties, or do it outside of the form function altogether.

Also the function signature for Drupal 6 should not contain the $form variable as an argument, but the $form_state variable instead. And you're currently setting the value (text) of the submit button to the HTML representation of a an &lt;input&gt; field which will never do what you want.

Try using code like this instead:

function ismiv3point1_search_block_form($form_state) {
  $form['search_block_form']['#title'] = ''; 
  $form['search_block_form']['#value'] = 'Search mysite.org';

  $form['submit']['#type'] = 'markup'; 
  $form['submit']['#value'] = 'Search the Site';
  $form['submit']['#weight'] = 2;


  // this is the new field I'm trying to add  
  $form['image_switch'] = array(
      '#type' =&gt; 'radios',
      '#title' =&gt; t('Image Switch Radios'),
      '#prefix' =&gt; '&lt;br /&gt;&lt;span style="color:#fff"&gt;',
      '#suffix'   =&gt; '&lt;/span&gt;',
      '#weight' =&gt; '3',
      '#options' =&gt; array(
          1 =&gt; t('Images'),
          2 =&gt; t('All'),
      ),  
      '#default_value' =&gt; 1       
  );

  $form['#prefix'] = '&lt;div id="search-box" style="margin-top: 10px; margin-bottom: 0px;"&gt;';
  $form['#suffix'] = '
      &lt;div id="search-loading"&gt;&lt;/div&gt;
      &lt;div id="current-type"&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/div&gt;
      &lt;ul class="content-types"&gt;
          &lt;li&gt;&lt;a href="#" class="date"&gt;Sort by newest first&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" class="relevance"&gt;Sort by relevance&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;';

  return $form;
}


EDIT

Just a bit of extra info on how to do this with a form alter hook:

function ismiv3point1_form_search_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['image_switch'] = array(
    '#type' =&gt; 'radios',
    '#title' =&gt; t('Image Switch Radios'),
    '#prefix' =&gt; '&lt;br /&gt;&lt;span style="color:#fff"&gt;',
    '#suffix'   =&gt; '&lt;/span&gt;',
    '#weight' =&gt; '3',
    '#options' =&gt; array(
        1 =&gt; t('Images'),
        2 =&gt; t('All'),
    ),  
    '#default_value' =&gt; 1       
  );
}