show form input
This commit is contained in:
@@ -53,8 +53,7 @@ mapValues get set (Form {view, fill}) =
|
||||
}
|
||||
|
||||
runForm :: Form i o -> i -> View (Either i o)
|
||||
runForm (Form {view}) i =
|
||||
div_ [] $
|
||||
(fmap Left <$> view i)
|
||||
<> [ button_ [type_ "submit"] [text "submit"]
|
||||
]
|
||||
runForm form i =
|
||||
form_ [onSubmit (either (\_ -> Left i) (Right) (form.fill i))] $
|
||||
(fmap Left <$> form.view i)
|
||||
<> [button_ [type_ "submit"] [text "submit"]]
|
||||
|
||||
Reference in New Issue
Block a user