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
type
string / Default: ”
Type of the Item, listed in Item_Type class
id
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
name
string / Default: ”
The name of the option, for display purposes only.
It is often displayed on the left for fields for example
desc
string / Default: ”
The description to display together with this item.
class
string / Default: ”
A CSS class for this option.
It will be added as CSS class in item
need_form
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
global_form_independent
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
use_reset
boolean / Default: true
Used to display a reset button, to default values
save
string / Default: ‘Save’
Label for save button
reset
string / Default: ‘Reset’
Label for reset button
reset_question
string /
Default: ‘Do you really want to reset form?’
Question asked to confirm reset