Pages.FormState

type Event
= InputEvent String
| FocusEvent
| BlurEvent
type alias FieldEvent =
{ value : String
, formId : String
, name : String
, event : Event
}
type alias FieldState =
{ value : String
, status : FieldStatus
}
type alias FormState =
{ fields : Dict String FieldState
, submitAttempted : Bool
}
type alias PageFormState =
Dict String FormState
init : FormState
listeners : String -> List (Attribute (Msg userMsg))
{ formId : String
, name : String
, value : String
}
-> PageFormState
-> PageFormState
setSubmitAttempted : String -> PageFormState -> PageFormState
update : Value -> PageFormState -> PageFormState