x\panel\lot\type\field()

Constructs data for the Field component.

Table of Contents
  1. Description
  2. Example
  3. Options

Description

x\panel\lot\type\field(array $value, int|string $key): XML|string;

Field components must be nested in a Fields component. This is the base function used to construct a Field component.

Example

echo x\panel\lot\type\field([
    'content' => '<p>This is a field content.</p>',
    'description' => 'This is a field description.',
    'title' => 'Field'
], 0);

Options

KeyValueDescription
0false|stringThe element name for the HTML class instance.
1stringThe element content as a string. This value has the highest priority. If this value is set, then data of content and lot properties will be automatically ignored.
2arrayAn array of pairs of attribute names and their values to be applied to the element.
activeboolSpecifies whether the field is enabled; if not set, it has an implicit value of true.
arearray-
asarray-
canarray-
contentstring-
decorsarray-
descriptionarray|string-
fieldarray-
fixbool-
flexbool-
hasarray-
heightarray|int|string-
hintarray|string-
iconarray|string-
idstring-
isarray-
keyint|string-
lotarray-
namestring-
notarray-
ofarray-
patternstring-
skipbool-
stackfloat|int-
tagsarray-
textarray|string-
titlearray|string-
typestring-
unitstring-
valuemixed-
valuesarray-
vitalbool-
widtharray|int|string-
witharray-