This module provides helpers for your update function. Please refer to the examples for a better understanding
This function will update a Form for you. Here is how to use it :
type YourMsg
= Form (Form.Update.Msg comparable)
| ....
yourUpdate : YourMsg -> Model -> Model
yourUpdate msg model =
case msg of
Form formMsg ->
{ model | yourForm = Form.Update.updateForm formMsg model.yourForm }
yourView : Model -> Html YourMsg
yourView model =
...
onEvent (Form << Form.Update.UpdateStringField fieldKey)
onEvent (Form << Form.Update.UpdateBoolField fieldKey)
...Helps defining some extra effects on a Field event. You can use this
function to add your effects when a specific event is triggered on a Field.
effects model formMsg stringEffects boolEffects -- Cmd YourMsgThis version only defines effects for the UpdateStringField message
This version only defines effects for the UpdateBoolField message
Predifined messages to help updating a
Field.UpdateStringFieldis forStringValueFieldandUpdateBoolFieldis forBoolValueField