digestive-functors-blaze-0.2.1.0: Blaze frontend for the digestive-functors library

Text.Digestive.Blaze.Html5

Synopsis

Documentation

type BlazeFormHtml = FormHtml HtmlSource

Form HTML generated by blaze

inputTextAreaSource

Arguments

:: (Monad m, Functor m, FormInput i f) 
=> Maybe Int

Rows

-> Maybe Int

Columns

-> Maybe Text

Default input

-> Form m i e BlazeFormHtml Text

Result

inputTextArea'Source

Arguments

:: (Monad m, Functor m, FormInput i f) 
=> Maybe Int

Rows

-> Maybe Int

Columns

-> Maybe String

Default input

-> Form m i e BlazeFormHtml String

Result

inputTextRead :: (Monad m, Functor m, FormInput i f, Show a, Read a) => e -> Maybe a -> Form m i e BlazeFormHtml aSource

inputPasswordSource

Arguments

:: (Monad m, Functor m, FormInput i f) 
=> Bool

Retain input?

-> Form m i e BlazeFormHtml Text

Resulting form

inputPassword'Source

Arguments

:: (Monad m, Functor m, FormInput i f) 
=> Bool

Retain input?

-> Form m i e BlazeFormHtml String

Resulting form

inputRadioSource

Arguments

:: (Monad m, Functor m, FormInput i f, Eq a) 
=> Bool

Use br tags

-> a

Default option

-> [(a, Html)]

Choices with their names

-> Form m i e BlazeFormHtml a

Resulting form

inputFileSource

Arguments

:: (Monad m, Functor m, FormInput i f) 
=> Form m i e BlazeFormHtml (Maybe f)

Form

inputSelectSource

Arguments

:: (Monad m, Functor m, FormInput i f, Eq a) 
=> a

Default option

-> [(a, Html)]

Choices with their names

-> Form m i e BlazeFormHtml a

Resulting form

submitSource

Arguments

:: Monad m 
=> String

Text on the submit button

-> Form m i e BlazeFormHtml ()

Submit button

inputListSource

Arguments

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

inputListJs :: StringSource

A string containing the javascript functions needed for inputList. This code requires JQuery.