input

A single HTML field for all input type.

Note: This field is not recommended for button, file, image, radio, reset, search and submit type.

It is best to use other build in fields that provide more control and features.

Special properties of field

See "attributes compatibility" at the end of this page.

Usage

Text field with 50 characters limit :

{
    type: "input",
    inputType: "text",
    label: "Name",
    model: "name",
    maxlength: 50,
    required: true,
    placeholder: "User's full name",
    validator: validators.string
}

Attributes compatibility

Since attributes depend on the type of input, here is a table showing the compatible attributes for each field type. Source

Last updated