【发布时间】:2015-04-15 16:42:41
【问题描述】:
我打算使用 BootstrapHorizontalForm,使用示例 guide,我的代码:
表格
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")])
GET 方法
getChurchNewR :: Handler Html
getChurchNewR = do
(widget, enctype) <- generateFormPost $
renderBootstrap3 (BootstrapHorizontalForm (ColSm 0) (ColSm 4) (ColSm 0) (ColSm 6))
(churchForm Nothing)
defaultLayout $ do
msgAction = MsgCreateAction
actionR = ChurchNewR
mPath = Nothing
$(widgetFile "church/church")
但是有这个错误:
Handler/Church.hs:63:67:不在范围内:数据构造函数“ColSm”
感谢您的帮助
【问题讨论】:
标签: haskell yesod yesod-forms