Own HTML Code can be placed in:
- fieldwraptemplate
- fieldtemplate
Declaration of a placeholder in fieldwraptemplate:
The HTML File has to be placed in the folder with the datadefinition, naming like this:
- <datadefinition>_k8form_<placeholder_name>.html
identifier
Normally the most important property of the form elements is the name. The identifier allows you to prepare different inputs for the same field. Example: normally the field userID is a hidden field (identifier: userID_hidden). When the admin is logged in you want to allow him to change the userID. So you create the userID as datalist with the identifier "userID_datalist". Depending on the logged in user, you can activate or deactivate the fields.
active
The field can be set to: true / false. Only active fields are displayed in the form.
figure
The default is 1. In filter forms it can be set to 2. So 2 fields: from/to are displayed.
label
If the label is not set, it will be automatically set to 'name'. If the translation is activated, it will be translated according to the translation file.
tagName
Default is "input". tagNames with special behavior are:
- input (default)
- select
- textarea
- button
- all others are allowed to implement HTML elements
inputgroup
The inputgroup allow several input fields and html elements in one line. Please have a look to the inputgroup chapter.
options
By select and type=radio the options need to be filled out. Please look to the options chapter.
fieldclass
The fieldclass overwrites the class of the field.
fieldclass_add
fieldclass_add is added to the class of the field.
labelclass
The labelclass overwrites the class of the label.
decimals
A step attribute is added to the field.
fieldtemplate
An own fieldtemplate replaces the standard fieldtemplate.
input_attributes
Attributes can additionally added as string to 'input_attributes'.
attributes{}
All attributes of this data structure are added to the tag.
name
This is the most important attribute and the only one which is required.
id
The id is automatically added and is set equal to the name.
type
The following input types have a special behavior:
- hidden
- number
- checkbox
- radio
All other types can be used with standard functionality:
- text
- date
- time
- datetime-local
- ...
maxlength
maxlength limits the allowed caracters to the specified number.
placeholder
The placeholder attribute is added. A translation is supported, if activated.
required
true / false
readonly
true / false
disabled
true / false