rakutentech/r10/1.1.0

NOTE: the latest version is 7.0.0

R10.Form

This is what you need to add a form in your page.

view : Model -> (Msg -> msg) -> List (Element msg)

This is the no-configuration version.

viewWithOptions : Model -> (Msg -> msg) -> Options -> List (Element msg)

Use this version for a full control.

viewWithPalette : Model -> (Msg -> msg) -> Palette -> List (Element msg)

Use this version if you have a specific palette that you want to use.

type alias Maker =
MakerArgs -> List Entity -> List (Element Msg)
type alias MakerArgs =
{ key : Key
, formState : State
, translator : ValidationCode -> String
, style : Style
, palette : Palette
}
type alias Model =
{ conf : Conf
, state : State
}

Forms are composed of two parts: a configuration and a state.

type alias Options =
{ maker : Maybe Maker
, translator : Maybe (ValidationCode -> String)
, style : Style
, palette : Maybe Palette
}