- input :: Monad m => Maybe String -> XHtmlForm m String
- textarea :: Monad m => Maybe Int -> Maybe Int -> Maybe String -> XHtmlForm m String
- password :: Monad m => Maybe String -> XHtmlForm m String
- file :: Monad m => XHtmlForm m File
- checkbox :: Monad m => Maybe Bool -> XHtmlForm m Bool
- hidden :: Monad m => Maybe String -> XHtmlForm m String
- inputInteger :: Monad m => Maybe Integer -> XHtmlForm m Integer
- radio :: Monad m => [(String, String)] -> Maybe String -> XHtmlForm m String
- enumRadio :: (Monad m, Enum a) => [(a, String)] -> Maybe a -> XHtmlForm m a
- label :: (Monad m, HTML h) => h -> Form Html m ()
- selectXHtml :: HTML h => [HtmlAttr] -> [(String, h)] -> String -> String -> Html
- selectRaw :: (Monad m, HTML h) => [HtmlAttr] -> [(String, h)] -> Maybe String -> Form Html m String
- select :: (Eq a, Monad m, HTML h) => [HtmlAttr] -> [(a, h)] -> Maybe a -> Form Html m a
- enumSelect :: (Enum a, Bounded a, Show a, Eq a, Monad m) => [HtmlAttr] -> Maybe a -> Form Html m a
- type XHtmlForm m a = Form Html m a
- module Text.Formlets
Documentation
textarea :: Monad m => Maybe Int -> Maybe Int -> Maybe String -> XHtmlForm m StringSource
A textarea with optional rows and columns, and an optional value
password :: Monad m => Maybe String -> XHtmlForm m StringSource
A password field with an optional value
checkbox :: Monad m => Maybe Bool -> XHtmlForm m BoolSource
A checkbox with an optional default value
enumRadio :: (Monad m, Enum a) => [(a, String)] -> Maybe a -> XHtmlForm m aSource
An radio choice for Enums
:: HTML h | |
=> [HtmlAttr] | Optional attributes for the select-box |
-> [(String, h)] | The values and their labels |
-> String | The name |
-> String | The value that is selected |
-> Html |
This is a helper function to generate select boxes
:: (Monad m, HTML h) | |
=> [HtmlAttr] | Optional attributes for the select-element |
-> [(String, h)] | Pairs of value/label |
-> Maybe String | An optional default value |
-> Form Html m String |
A drop-down for selecting values
select :: (Eq a, Monad m, HTML h) => [HtmlAttr] -> [(a, h)] -> Maybe a -> Form Html m aSource
A drop-down for anything that is an instance of Eq
enumSelect :: (Enum a, Bounded a, Show a, Eq a, Monad m) => [HtmlAttr] -> Maybe a -> Form Html m aSource
A drop-down for all the options from |a|.
module Text.Formlets