@@ -190,12 +190,10 @@ data Checkbox t
190190checkbox :: (DomBuilder t m, PostBuild t m) => Bool -> CheckboxConfig t -> m (Checkbox t)
191191checkbox checked config = do
192192 let insertType = Map.insert "type" "checkbox"
193− insertChecked = if checked
194− then Map.insert "checked" "checked"
195− else id
196− dAttrs = fmap (insertChecked . insertType) $ _checkboxConfig_attributes config
193+ dAttrs = fmap (Map.delete "checked" . insertType) $ _checkboxConfig_attributes config
197194 modifyAttrs <- dynamicAttributesToModifyAttributes dAttrs
198195 i <- inputElement $ def
196+ & inputElementConfig_initialChecked .~ checked
199197 & inputElementConfig_setChecked .~ _checkboxConfig_setValue config
200198 & inputElementConfig_elementConfig . elementConfig_modifyAttributes .~ modifyAttrs
201199 return $ Checkbox