fn-extra-0.3.0.2: Extras for Fn, a functional web framework.

Safe HaskellNone
LanguageHaskell2010

Web.Fn.Extra.Digestive

Synopsis

Documentation

runForm :: RequestContext ctxt => ctxt -> Text -> Form v IO a -> ((View v, Maybe a) -> IO a1) -> IO a1 Source #

This function runs a form and passes the function in it's last argument the result, which is a View and an optional result. If the request is a get, or if the form failed to validate, the result will be Nothing and you should render the form (with the errors from the View).