digestive-functors-0.0.1: A general way to consume input using applicative functors

Text.Digestive.Html

Description

General functions for forms that are rendered to some sort of HTML

Synopsis

Documentation

data FormHtmlConfig Source

Settings for classes in generated HTML.

Constructors

FormHtmlConfig 

Fields

htmlInputClasses :: [String]

Classes applied to input elements

htmlLabelClasses :: [String]

Classes applied to labels

htmlErrorClasses :: [String]

Classes applied to errors

htmlErrorListClasses :: [String]

Classes for error lists

Instances

newtype FormHtml a Source

HTML describing a form

Constructors

FormHtml 

Fields

unFormHtml :: FormHtmlConfig -> a
 

Instances

applyClassesSource

Arguments

:: (a -> String -> a)

Apply the class attribute

-> [FormHtmlConfig -> [String]]

Labels to apply

-> FormHtmlConfig

Label configuration

-> a

HTML element

-> a

Resulting element

Apply all classes to an HTML element. If no classes are found, nothing happens.

defaultHtmlConfig :: FormHtmlConfigSource

Default configuration

emptyHtmlConfig :: FormHtmlConfigSource

Empty configuration (no classes are set)

renderFormHtml :: FormHtml a -> aSource

Render FormHtml using the default configuration

renderFormHtmlWith :: FormHtmlConfig -> FormHtml a -> aSource

Render FormHtml using a custom configuration