diff --git a/Yesod/Form.hs b/Yesod/Form.hs index fcb32fae..5ce22c39 100644 --- a/Yesod/Form.hs +++ b/Yesod/Form.hs @@ -742,7 +742,7 @@ maybeStringInput n = boolInput :: String -> FormInput sub master Bool boolInput n = GForm $ \env _ -> return - (FormSuccess $ isJust $ lookup n env, return $ addBody [$hamlet| + (FormSuccess $ fromMaybe "" (lookup n env) /= "", return $ addBody [$hamlet| %input#$n$!type=checkbox!name=$n$ |], UrlEncoded)