Input
Input control
Parameters you can pass
Parameter | Data type | Description |
---|---|---|
type | string | Type of input (hidden, text, etc) |
name | string | Name of input that will be used in the form |
value | string | Value |
id | string | Input ID |
class_name | string | Wrapper class (if several classes passed, divide them by Space) |
placeholder | string | Placeholder |
max_length | int | Maximum length |
disabled | bool | Shows if it's disabled |
readonly | bool | Shows if it's readonly |
required | bool | Shows if it's required |
Default
self.render({ ref: '/tmpl/controls/input.twig' }, {
name: 'username',
placeholder: 'Enter user name'
});
Disabled
self.render({ ref: '/tmpl/controls/input.twig' }, {
name: 'username',
placeholder: 'Enter user name',
disabled: true
});
Readonly
self.render({ ref: '/tmpl/controls/input.twig' }, {
name: 'username',
value: 'Danny Chandler',
readonly: true
});
Updated 5 months ago