Textarea
Textarea control
Parameters you can pass
Parameters | Data type | Description |
---|---|---|
name | string | Name of input that will be used in the form |
value | string | Value |
id | string | Textarea ID |
class_name | string | Wrapper class (if several classes passed, divide them by Space) |
placeholder | string | Placeholder |
maxlength | int | Maximum length |
disabled | bool | Shows if it's disabled |
readonly | bool | Shows if it's readonly |
Default
self.render({ ref: '/tmpl/controls/textarea.twig' }, {
name: 'text',
class_name: 'my-custom-textarea',
placeholder: 'Enter text...'
});
Disabled
self.render({ ref: '/tmpl/controls/textarea.twig' }, {
name: 'text',
class_name: 'my-custom-textarea',
disabled: true,
value: 'Can\'t type'
});
Readonly
self.render({ ref: '/tmpl/controls/textarea.twig' }, {
name: 'text',
class_name: 'my-custom-textarea',
readonly: true,
value: 'You can only read it...'
});
Updated 5 months ago