form_fieldset([$legend_text = ''[, $attributes = array()]])
Parameters: |
|
---|---|
Returns: |
An HTML fieldset opening tag |
Return type: |
string |
Lets you generate fieldset/legend fields.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 | 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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | $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.