yesod-form-1.7.9: Form handling support for Yesod Web Framework

Safe Haskell | None
Language | Haskell2010

Yesod.Form.MassInput

Description

A module providing a means of creating multiple input forms, such as a list of 0 or more recipients.

Synopsis

- inputList :: (xml ~ WidgetFor site (), RenderMessage site FormMessage) => Html -> ([[FieldView site]] -> xml) -> (Maybe a -> AForm (HandlerFor site) a) -> Maybe [a] -> AForm (HandlerFor site) [a]
- massDivs :: [[FieldView site]] -> WidgetFor site ()
- massTable :: [[FieldView site]] -> WidgetFor site ()

# Documentation

inputList Source #

Arguments

:: (xml ~ WidgetFor site (), RenderMessage site FormMessage) |
=> Html | label for the form
-> ([[FieldView site]] -> xml) | how to display the rows, usually either `massDivs` or `massTable`
-> (Maybe a -> AForm (HandlerFor site) a) | display a single row of the form, where `Maybe a` gives the previously submitted value
-> Maybe [a] | default initial values for the form
-> AForm (HandlerFor site) [a] |

Generate a form that accepts 0 or more values from the user, allowing the user to specify that a new row is necessary.

massDivs :: [[FieldView site]] -> WidgetFor site () Source #

massTable :: [[FieldView site]] -> WidgetFor site () Source #