form_fieldset([$legend_text = ''[, $attributes = array()]])
| Parameters: |
|
|---|---|
| Returns: |
An HTML fieldset opening tag |
| Return type: |
string |
Lets you generate fieldset/legend fields.
Example:
echo form_fieldset('Address Information');
echo "<p>fieldset content here</p>\n";
echo form_fieldset_close();
/*
Produces:
<fieldset>
<legend>Address Information</legend>
<p>form content here</p>
</fieldset>
*/
Similar to other functions, you can submit an associative array in the second parameter if you prefer to set additional attributes:
$attributes = array(
'id' => 'address_info',
'class' => 'address_info'
);
echo form_fieldset('Address Information', $attributes);
echo "<p>fieldset content here</p>\n";
echo form_fieldset_close();
/*
Produces:
<fieldset id="address_info" class="address_info">
<legend>Address Information</legend>
<p>form content here</p>
</fieldset>
*/
Please login to continue.