yesod-form-bulma-0.1.0.0: support Bulma form for Yesod

Safe HaskellNone
LanguageHaskell2010

Yesod.Form.Bulma.Fields

Synopsis

Documentation

bulmaIntField :: (Monad m, Integral i, RenderMessage (HandlerSite m) FormMessage) => Field m i Source #

Creates a input with type="number" and step=1.

bulmaTextField :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text Source #

Creates a input with type="text".

bulmaEmailField :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text Source #

Creates an input with type="email". Yesod will validate the email's correctness according to RFC5322 and canonicalize it by removing comments and whitespace (see Text.Email.Validate).

bulmaTextareaField :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Textarea Source #

Creates a <textarea> tag whose returned value is wrapped in a Textarea; see Textarea for details.

bulmaCheckBoxField :: YesodBulma site => Text -> Field (HandlerFor site) Bool Source #

Creates an input with type="checkbox". While the default boolField implements a radio button so you can differentiate between an empty response (Nothing) and a no response (Just False), this simpler checkbox field returns an empty response as Just False.

Note that this makes the field always optional.

bulmaRadioFieldList :: (YesodBulma site, Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a Source #

Creates an input with type="radio" for selecting one option.

bulmaRadioField :: (YesodBulma site, Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a Source #

Creates an input with type="radio" for selecting one option.

bulmaSelectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a Source #

Creates a <select> tag for selecting one option. Example usage:

areq (selectFieldList [("Value 1" :: Text, "value1"),("Value 2", "value2")]) "Which value?" Nothing

bulmaSelectField :: (Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a Source #

Creates a <select> tag for selecting one option. Example usage:

areq (selectField $ optionsPairs [(MsgValue1, "value1"),(MsgValue2, "value2")]) "Which value?" Nothing

bulmaCheckboxesFieldList :: (YesodBulma site, Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a] Source #

Creates an input with type="checkbox" for selecting multiple options.

bulmaCheckboxesField :: (YesodBulma site, Eq a) => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a] Source #

Creates an input with type="checkbox" for selecting multiple options.

bulmaMultiSelectFieldList :: (Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a] Source #

Creates a <select> tag for selecting multiple options.

bulmaMultiSelectField :: Eq a => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a] Source #

Creates a <select> tag for selecting multiple options.