Field represents a Form field
Fields regroups several Field and represents all your form fields.
myFormFields : Fields String
myFormFields =
fields
[ ( "some-input", input )
, ( "some-select", select )
, ( "some-checkbox", checkbox )
, ( "some-group",
, group
[ ( "some-other-field", input)
, ...
]
)
]Creates a Fields using a List. This is the top-level function when
creating form fields
Creates an input Field with the default string Value
Creates a select Field with the default string Value
Creates a checkbox Field with the default bool Value
Creates a fieldgroup using a List
myFormFields : Fields String
myFormFields =
fields
[ ( "some-input", inputWithDefault "Initial value" )
, ( "some-select", selectWithDefault "Default choice" )
, ( "some-checkbox", checkboxWithDefault True )
]Creates an input Field with a default value
Creates a select Field with a default value
Creates a checkbox Field with a default value
A
Fieldcan be :It is looked-up using
comparableso aField Stringuses aStringas field key