GoodForm


Fieldset

Fieldsets provide a good way to seperate sections of you forms. Goodform provides methods to open and close your fieldsets.

If you open a new fieldset without closing the previous fieldset, goodform will automatically close it for you!

There are two ways to call the open_field() method.

open_fieldset (string legend)

Example:

$this->goodform->open_fieldset('My Profile');

Will produce the following HTML:

<fieldset>
	<legend>Stuff</legend>

open_fieldset (array attributes)

All attributes in this array will be converted to HTML element attributes. GoodForm will not check if these attributes are HTML valid. The only exceptions to this are the Special attributes that are not passed to the elements attribute string.

Example:

$attr = array(
	'class' => 'my-fieldset-class',
	'legend' => 'Stuff'
);

$this->goodform->open_fieldset($attr);

Will produce the following HTML:

<fieldset class="my-fieldset-class">
	<legend>Stuff</legend>

close_fieldset ()

Example:

$this->goodform->close_fieldset();

Will produce the following HTML:

</fieldset>