Using the form api to create a fieldset:
$form['fieldset'] = array(
'#title' => 'title',
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#description' => 'desc',
);
Drupal will output:
<fieldset class="collapsible form-wrapper collapse-processed" id="edit-fieldset">
<legend>
<span class="fieldset-legend">
<a class="fieldset-title" href="#">
<span class="fieldset-legend-prefix element-invisible">Hide</span>
title
</a>
<span class="summary"></span>
</span>
</legend>
<div class="fieldset-wrapper">
<div class="form-item form-type-textfield form-item-testelement">
<label for="edit-testelement">asdf </label>
<input type="text" id="edit-testelement" name="testelement" value="" size="60" maxlength="128" class="form-text">
</div>
</div>
</fieldset>
The #title in the form array will be the <a>
you click on to expand the fieldset. I want to put text in the <span class="summary"></span>
, 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?