formlets-0.8: Formlets implemented in Haskell

Text.Blaze.Html5.Formlets

Synopsis

Documentation

input :: Monad m => Html5Formlet m StringSource

An input field with an optional value

textarea :: Monad m => Maybe Int -> Maybe Int -> Html5Formlet m StringSource

A textarea with optional rows and columns, and an optional value

password :: Monad m => Html5Formlet m StringSource

A password field with an optional value

hidden :: Monad m => Html5Formlet m StringSource

A hidden input field

inputInteger :: Monad m => Html5Formlet m IntegerSource

A validated integer component

file :: Monad m => Html5Form m FileSource

A file upload form

checkbox :: Monad m => Html5Formlet m BoolSource

A checkbox with an optional default value

radio :: Monad m => [(String, String)] -> Html5Formlet m StringSource

A radio choice

enumRadio :: (Monad m, Enum a) => [(a, String)] -> Html5Formlet m aSource

An radio choice for Enums

label :: Monad m => String -> Form Html m ()Source

A label

selectHtmlSource

Arguments

:: [(String, Html)]

The values and their labels

-> String

The name

-> String

The value that is selected

-> Html 

This is a helper function to generate select boxes

selectRawSource

Arguments

:: Monad m 
=> [(String, Html)]

Pairs of value/label

-> Html5Formlet m String

Resulting formlet

A drop-down for selecting values

selectSource

Arguments

:: (Eq a, Monad m) 
=> [(a, Html)]

Pairs of value/label

-> Html5Formlet m a

Resulting formlet

A drop-down for anything that is an instance of Eq

type Html5Form m a = Form Html m aSource