An Item is always created by passing it a settings array as a parameter.

Copy to Clipboard

Some settings will be common to all Items.

Item Settings Description
string / Default: ”
Type of the Item, listed in Item_Type class
string / Default: ”
A unique ID for this option. This ID will be used to get the value for this option.
It will be added as CSS ID in item, too
string / Default: ”
The name of the option, for display purposes only.
It is often displayed on the left for fields for example
string / Default: ”
The description to display together with this item.
string / Default: ”
A CSS class for this option.
It will be added as CSS class in item
boolean / Default: false
Set to true is the item need a form to work, like a field.
This option may be automatically set to true if the item is containing other items that have this option set to true
boolean / Default: false
Used to know if an item should be displayed independently of a global form.
This option is used to break a form rendering when the item is displayed.
It can be used in conjunction with need_form to force own form for a field.
Or to exclude a content item from a global form
boolean / Default: true
Used to display a reset button, to default values
string / Default: ‘Save’
Label for save button
string / Default: ‘Reset’
Label for reset button
string /
Default: ‘Do you really want to reset form?’
Question asked to confirm reset