How to enter text in a fieldset's summary? Using the form api to create a fieldset:

$form['fieldset'] = array(
 '#title' =&gt; 'title',
 '#type' =&gt; 'fieldset',
 '#collapsible' =&gt; TRUE,
 '#description' =&gt; 'desc',
);


Drupal will output:

&lt;fieldset class="collapsible form-wrapper collapse-processed" id="edit-fieldset"&gt;
  &lt;legend&gt;
    &lt;span class="fieldset-legend"&gt;
      &lt;a class="fieldset-title" href="#"&gt;
        &lt;span class="fieldset-legend-prefix element-invisible"&gt;Hide&lt;/span&gt;
         title
      &lt;/a&gt;
      &lt;span class="summary"&gt;&lt;/span&gt;
    &lt;/span&gt;
  &lt;/legend&gt;
  &lt;div class="fieldset-wrapper"&gt;
    &lt;div class="form-item form-type-textfield form-item-testelement"&gt;
      &lt;label for="edit-testelement"&gt;asdf &lt;/label&gt;
      &lt;input type="text" id="edit-testelement" name="testelement" value="" size="60" maxlength="128" class="form-text"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/fieldset&gt;


The #title in the form array will be the &lt;a&gt; you click on to expand the fieldset.  I want to put text in the &lt;span class="summary"&gt;&lt;/span&gt;, which puts additional, non linked text beside the title.  I can't seem to do this with the form api, as #description will only put text within the fieldset that is hidden when it is closed.

What's the easiest way to do this?
See vertical_tabs_example_form_alter(), there it's written:


  Vertical tabs provide its most usable appearance when they are used to
  include a summary of the information contained in the fieldset. To do
  this, we attach additional JavaScript to handle changing the summary
  when form settings are changed.


  '#attached' =&gt; array(
    'js' =&gt; array(
      'vertical-tabs' =&gt; drupal_get_path('module', 'vertical_tabs_example') . '/vertical_tabs_example.js',
    ),
  ),


In vertical_tabs_example.js it then goes on like so:


  Use the fieldset class to identify the vertical tab element. Depending
  on the checkbox status, the settings will be customized, so update the
  summary with the custom setting textfield string or a use a default
  string.


$('fieldset#edit-vertical-tabs-example', context).drupalSetSummary(function (context) {
  if ($('#edit-vertical-tabs-example-enabled', context).attr('checked')) {
    return Drupal.checkPlain($('#edit-vertical-tabs-example-custom-setting', context).val());
  }
  else {
    return Drupal.t('Using default');
  }
});