Input

Input control

Parameters you can pass

ParameterData typeDescription
typestringType of input (hidden, text, etc)
namestringName of input that will be used in the form
valuestringValue
idstringInput ID
class_namestringWrapper class (if several classes passed, divide them by Space)
placeholderstringPlaceholder
max_lengthintMaximum length
disabledboolShows if it's disabled
readonlyboolShows if it's readonly
requiredboolShows 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
  });