FieldInput

interface FieldInput { type: InputType; input_mode?: InputMode; auto_capitalize?: AutoCapitalize; max_length?: number; placeholder?: string; options?: 'countries' | 'states'; span?: number; }

How a field is drawn: the attributes a client puts on the control.


Properties

type: InputType

The control.

input_mode: InputMode

The control's inputmode, where a phone keyboard should differ from text.

auto_capitalize: AutoCapitalize

The control's autocapitalize.

max_length: number

The most characters the field accepts: the control's maxlength, and the number in its too_long message.

placeholder: string

The text a select shows before anything is chosen, in lang.

options: 'countries' | 'states'

What fills a select: countries is GET /v1/countries, and states is the country's state list (?include=states, or GET /v1/countries/:country/states).

span: number

How wide the field is relative to the others in its row: 2 is twice a 1.