{{#if textarea}}
  <textarea class="tbx {{#if textarea}}tbx_textarea{{/if}} {{#if error}}tbx_error{{/if}}" rows="{{textareaRows}}" cols="{{textareaCols}}" value="{{value}}" maxlength="{{maxlength}}" id="{{id}}" name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}" {{#if disabled}}disabled{{/if}}></textarea>
{{else if type}}
  <input
      type="{{type}}"
      class="tbx {{#if error}}tbx_error{{/if}} {{input-mod}}"
      value="{{value}}"
      id="{{id}}"
      name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}"
      placeholder="{{placeholder}}"
      {{#if (or locked disabled)}}disabled{{/if}}
      {{#if need-pattern}}pattern=""{{/if}}
      {{#if readonly}}readonly{{/if}}
      {{#if data-tag}}data-tag="{{data-tag}}"{{/if}}
      {{#if maxlength}}maxlength="{{maxlength}}"{{/if}}
      {{#if inputmode}}inputmode="{{inputmode}}"{{/if}}
      {{#if autocomplete}}autocomplete="{{autocomplete}}"{{/if}}
  >
{{else}}
  <input
      type="text"
      class="tbx {{#if error}}tbx_error{{/if}} {{input-mod}}"
      value="{{value}}"
      id="{{id}}"
      name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}"
      placeholder="{{placeholder}}"
      {{#if (or locked disabled)}}disabled{{/if}}
      {{#if need-pattern}}pattern=""{{/if}}
      {{#if readonly}}readonly{{/if}}
      {{#if data-tag}}data-tag="{{data-tag}}"{{/if}}
      {{#if error}}aria-invalid="true"{{/if}}
      {{#if maxlength}}maxlength="{{maxlength}}"{{/if}}
      {{#if inputmode}}inputmode="{{inputmode}}"{{/if}}
      {{#if autocomplete}}autocomplete="{{autocomplete}}"{{/if}}
    >
{{/if}}
