formlets-0.6.1: Formlets implemented in Haskell

Text.XHtml.Strict.Formlets

Synopsis

Documentation

input :: Monad m => XHtmlFormlet m StringSource

An input field with an optional value

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

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

password :: Monad m => XHtmlFormlet m StringSource

A password field with an optional value

file :: Monad m => XHtmlForm m FileSource

A file upload form

checkbox :: Monad m => XHtmlFormlet m BoolSource

A checkbox with an optional default value

hidden :: Monad m => XHtmlFormlet m StringSource

A hidden input field

inputInteger :: Monad m => XHtmlFormlet m IntegerSource

A validated integer component

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

A radio choice

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

An radio choice for Enums

label :: (Monad m, HTML h) => h -> Form Html m ()Source

selectXHtmlSource

Arguments

:: 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

selectRawSource

Arguments

:: (Monad m, HTML h) 
=> [HtmlAttr]

Optional attributes for the select-element

-> [(String, h)]

Pairs of value/label

-> XHtmlFormlet m String 

A drop-down for selecting values

select :: (Eq a, Monad m, HTML h) => [HtmlAttr] -> [(a, h)] -> XHtmlFormlet 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] -> XHtmlFormlet m aSource

A drop-down for all the options from |a|.

type XHtmlForm m a = Form Html m aSource