kutyel / elm-form / Form.Input

Html input view helpers, wired for elm-form validation.


type alias Input e a =
Form.FieldState e a -> List (Html.Attribute Form.Msg) -> Html Form.Msg

An input renders Html from a field state and list of additional attributes. All input functions using this type alias are pre-wired with event handlers.

baseInput : String -> (String -> Form.Field.FieldValue) -> Form.InputType -> Form.FieldState e String -> List (Html.Attribute Form.Msg) -> Html Form.Msg

Untyped input, first param is type attribute.

textInput : Input e String

Text input.

passwordInput : Input e String

Password input.

textArea : Form.FieldState e String -> List (Html.Attribute Form.Msg) -> Html Form.Msg

Textarea.

checkboxInput : Form.FieldState e Basics.Bool -> List (Html.Attribute Form.Msg) -> Html Form.Msg

Checkbox input.

selectInput : List ( String, String ) -> Form.FieldState e String -> List (Html.Attribute Form.Msg) -> Html Form.Msg

Select input.

radioInput : String -> Form.FieldState e String -> List (Html.Attribute Form.Msg) -> Html Form.Msg

Radio input.