- type BlazeFormHtml = FormHtml Html
- inputText :: (Monad m, Functor m, FormInput i f) => Formlet m i e BlazeFormHtml String
- inputHidden :: (Monad m, Functor m, FormInput i f) => Formlet m i e BlazeFormHtml String
- inputTextArea :: (Monad m, Functor m, FormInput i f) => Maybe Int -> Maybe Int -> Maybe String -> Form m i e BlazeFormHtml String
- inputTextRead :: (Monad m, Functor m, FormInput i f, Show a, Read a) => e -> Maybe a -> Form m i e BlazeFormHtml a
- inputPassword :: (Monad m, Functor m, FormInput i f) => Form m i e BlazeFormHtml String
- inputCheckBox :: (Monad m, Functor m, FormInput i f) => Bool -> Form m i e BlazeFormHtml Bool
- inputRadio :: (Monad m, Functor m, FormInput i f, Eq a) => Bool -> a -> [(a, Html)] -> Form m i e BlazeFormHtml a
- inputFile :: (Monad m, Functor m, FormInput i f) => Form m i e BlazeFormHtml (Maybe f)
- submit :: Monad m => String -> Form m i e BlazeFormHtml ()
- label :: Monad m => String -> Form m i e BlazeFormHtml ()
- errors :: Monad m => Form m i Html BlazeFormHtml ()
- childErrors :: Monad m => Form m i Html BlazeFormHtml ()
- inputList :: (Monad m, Functor m, FormInput i f) => Formlet m i e BlazeFormHtml Int -> Formlet m i e BlazeFormHtml a -> Formlet m i e BlazeFormHtml [a]
- inputListJs :: String
- module Text.Digestive.Forms.Html
Documentation
type BlazeFormHtml = FormHtml HtmlSource
Form HTML generated by blaze
inputHidden :: (Monad m, Functor m, FormInput i f) => Formlet m i e BlazeFormHtml StringSource
inputTextRead :: (Monad m, Functor m, FormInput i f, Show a, Read a) => e -> Maybe a -> Form m i e BlazeFormHtml aSource
inputPassword :: (Monad m, Functor m, FormInput i f) => Form m i e BlazeFormHtml StringSource
inputCheckBox :: (Monad m, Functor m, FormInput i f) => Bool -> Form m i e BlazeFormHtml BoolSource
:: Monad m | |
=> String | Text on the submit button |
-> Form m i e BlazeFormHtml () | Submit button |
childErrors :: Monad m => Form m i Html BlazeFormHtml ()Source
:: (Monad m, Functor m, FormInput i f) | |
=> Formlet m i e BlazeFormHtml Int | The formlet holding the number of items in the list |
-> Formlet m i e BlazeFormHtml a | The formlet used for each list item. This function surrounds it with a div tag with the inputListItem class. |
-> Formlet m i e BlazeFormHtml [a] | The dynamic list formlet |
Wraps the more generic Text.Digestive.Forms.inputList
function to
provide a reasonable default for adding add/remove controls to a form.
The whole thing is wrapped in another div with the class inputList. For
this function to work, the javascript code in inputListJs
or something
similar must be in scope.
The user needs to specify the hidden formlet because transformRead requires an error parameter, and this function can't specify it without loss of generality. The idea is that the extra power of being able to customize the formlet is worth the small amount of extra code compared to having to specify the error.
A string containing the javascript functions needed for inputList. This code requires JQuery.
module Text.Digestive.Forms.Html