layout-bootstrap-0.2.2: Template and widgets for Bootstrap2 to use with Text.Blaze.Html5

Safe HaskellSafe-Infered

Layout.Bootstrap.Forms

Contents

Description

Generic form builder and processor. Not-so bootstrap, but uses it's widgets.

Example form:

 checkForm = (emptyForm []) { required = [ textField "Service" "test:pass" "Service ID. For example: «test:pass»."
                                         , textField "Account" "9999995000" "Account ID. For example: «5077322496»." ]
                            , optional = [ textField "Amount" "0.12" "Amount to check." ]

Synopsis

Form composition

data Form Source

Form container

Constructors

Form 

Instances

emptyForm :: [Text] -> FormSource

Very basic form. You can add fancy required/optional fields with record modifiers or generate simple textfields from a list of names.

textField :: Text -> Text -> Text -> InputSource

Text field builder to be used with Form constructor.

Processing with HappStack