我打算使用 BootstrapHorizontalForm,使用本指南的示例,我的代码:
表格
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")
但有这个错误:
处理程序/Church.hs:63:67:不在范围内:数据构造函数“ColSm”</p>
谢谢你的帮助