haskell - use BootstrapHorizontalForm in yesod -
i intend use bootstraphorizontalform, use how example guide, code:
the form
churchform :: maybe church -> aform handler (church,maybe fileinfo) churchform mc = (,) <$> (church <$> areq textfield (bfs msgname) (churchname <$> mc) <* bootstrapsubmit (bootstrapsubmit msgcreateaction "btn-default" [("attribute-name","attribute-value")])
the method
getchurchnewr :: handler html getchurchnewr = (widget, enctype) <- generateformpost $ renderbootstrap3 (bootstraphorizontalform (colsm 0) (colsm 4) (colsm 0) (colsm 6)) (churchform nothing) defaultlayout $ msgaction = msgcreateaction actionr = churchnewr mpath = nothing $(widgetfile "church/church")
but have error:
handler/church.hs:63:67: not in scope: data constructor ‘colsm’
thanks help
this looks missing import. check import cpmsm
@ top of file.
this import of form:
import yesod.form.bootstrap3 (bootstrapgridoptions (colsm))
or
import yesod.form.bootstrap3 (bootstrapgridoptions (..))
or even
import yesod.form.bootstrap3
if doesn't sound familiar, can take @ the modules chapter learn haskell know more imports.
Comments
Post a Comment