Textarea

Textarea control

Parameters you can pass

ParametersData typeDescription
namestringName of input that will be used in the form
valuestringValue
idstringTextarea ID
class_namestringWrapper class (if several classes passed, divide them by Space)
placeholderstringPlaceholder
maxlengthintMaximum length
disabledboolShows if it's disabled
readonlyboolShows 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...'
  });