Eno\Section » fieldset

fieldset($name) → Fieldset or null
fieldset($name, $options) → Fieldset or null

Retrieve a fieldset from the section, optionally supplying an options array.

enocolor ratings:
red = 5
green = 7
blue = 3
php$section->fieldset('color ratings');   // returns [Fieldset name="color ratings" entries=3]
$section->fieldset('temperature ratings');   // throws a ValidationError

$section->fieldset('temperature ratings', [ 'required' => false ]);   // returns null
$section->fieldset('temperature ratings', [ 'enforce_element' => true ]);  // throws a ValidationError



A string representing the name of the field to return.



A boolean stating whether the fieldset must exist in the document (defaults to false)


Alias for enforce_element (this exists on many methods and depending on context refers to either element or value)

Return value

A Fieldset, or null.