Section » fieldset

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

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

enocolor ratings:
red = 5
green = 7
blue = 3
javascriptsection.fieldset('color ratings');   // returns [object Fieldset name="color ratings" entries=3]
section.fieldset('temperature ratings');   // throws an error

section.fieldset('temperature ratings', { required: false });   // returns null
section.fieldset('temperature ratings', { enforceElement: true });  // throws an error

Parameters

name

A string representing the name of the field to return.

options

enforceElement

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

required

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

Return value

An Eno::Fieldset, or null.