Properties
For each field has list fields required and optinal, on this table bellow
Name | Type | Description | Required |
---|---|---|---|
text | string | Field type text, ex: field username | Yes |
name | string | Attribute name of field | Yes |
id | string | Attribute id of field | Yes |
classes | array | List classes for field classes: ["form-control", "...", ...etc] | No |
value | any | Attribute value of field to give default value | No |
label | string | Label of field | No |
placeholder | string | Placeholder of field | No |
min | interger | Min number of caracters | No |
max | interger | Max number of caracters | No |
rows | interger | Number rows for field textarea | No |
cols | interger | Number cols for field textarea | No |
options | array | List options for field type select options: [ { value: 1, title: 'option 1' }, { value: 2, title: 'option 2' } ] | Yes |
items | array | List item for field type radio items: [ { id: 'radio1', value: 1, title: 'radio 1' }, { id: 'radio2', value: 2, title: 'radio 2' } ] | Yes |
step | integer | Step value for field type range | Yes |
multiple | boolean | Enable or disable multiple option for fields type: autocomplete, file | No |
loadItemes | array | List item for field type autocomplete items: [ { id: 1, title: "item 1" }, { id: 2, title: "item 2" }, { id: 3, title: "item 3" }, { id: 4, title: "item 4" } ] | Yes |
showPreview | boolean | Show preview of image field | No |
disabled | boolean | Disabled field | No |
readonly | boolean | Make field just for reading | No |
rules | array | List of core or custom rules, ex: validation: ["required", "min:6"] for more details Validation |
No |
messages | object | List messages for each core or custom rules, ex:
messages: {
rule: "You custom message"
}
for more details Rules |
No |
preprocess | function | Hook to alter current field
preprocess: (field, fields, values) => {
return field;
}
for more details Preprocess |
No |