Module

Formless.Retrieve

A module with functions for retriving particular fields from a form

#getField

getField :: forall e i o. FormFieldGet e i o (Record (FormFieldRow e i o))

Given a form, get the field at the specified symbol

#getInput

getInput :: forall e i o. FormFieldGet e i o i

Given a form, get the input at the specified symbol

#getTouched

getTouched :: forall e i o. FormFieldGet e i o Boolean

Given a form, get the touched field at the specified symbol

#getResult

getResult :: forall e i o. FormFieldGet e i o (FormFieldResult e o)

Given a form, get the result at the specified symbol

#getError

getError :: forall e i o. FormFieldGet e i o (Maybe e)

Given a form, get the error (if it exists) at the specified symbol

#getOutput

getOutput :: forall e i o. FormFieldGet e i o (Maybe o)

Given a form, get the output (if it exists) at the specified symbol

#getInputAll

getInputAll :: GetAll GetInputField

Get the form as a record where all fields are only the input value

#getTouchedAll

getTouchedAll :: GetAll GetTouchedField

Get the form as a record where all fields are only the touched value

#getResultAll

getResultAll :: GetAll GetResultField

Get the form as a record where all fields are only the result value

#getErrorAll

getErrorAll :: GetAll GetError

Get the form as a record where all fields are only the error value

#getOutputAll

getOutputAll :: GetAll GetOutput

Get the form as a record where all fields are only the output value

#_Field

_Field :: forall e i o. FormFieldLens e i o (Record (FormFieldRow e i o))

A lens to operate on the field at a given symbol in your form

#_FieldInput

_FieldInput :: forall e i o. FormFieldLens e i o i

A lens to operate on the input at a given symbol in your form

#_FieldTouched

_FieldTouched :: forall e i o. FormFieldLens e i o Boolean

A lens to operate on the 'touched' field at a given symbol in your form

#_FieldResult

_FieldResult :: forall e i o. FormFieldLens e i o (FormFieldResult e o)

A lens to operate on the 'result' field at a given symbol in your form

#_FieldError

_FieldError :: forall sym form fields t0 e i o. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => Proxy sym -> Traversal' (form Record FormField) e

A traversal to operate on the possible error inside the 'result' field at a given symbol in your form

#_FieldOutput

_FieldOutput :: forall sym form fields t0 e i o. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => Proxy sym -> Traversal' (form Record FormField) o

A traversal to operate on the possible output inside the 'result' field at a given symbol in your form

#FormFieldGet

type FormFieldGet e i o x = forall sym form fields t0. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => Proxy sym -> form Record FormField -> x

A type representing a function to produce a value from a record of form fields given a particular symbol. The result of view from Data.Lens applied with a particular lens to the form.

#FormFieldLens

type FormFieldLens e i o x = forall sym form fields t0. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => Proxy sym -> Lens' (form Record FormField) x

A type representing a lens onto part of a form field

#GetAll

type GetAll f = forall form r0 r1. HMap f r0 r1 => Newtype (form Record FormField) r0 => form Record FormField -> r1

A type representing retrieving all of a particular field with the field's constructor name. For internal use.

#GetInputField

data GetInputField

Data constructor for the getInputField function

Constructors

Instances

#GetTouchedField

data GetTouchedField

Data constructor for the getTouchedField function

Constructors

Instances

#GetResultField

data GetResultField

Data constructor for the getResultField function

Constructors

Instances

#GetError

data GetError

Data constructor for the getError function

Constructors

Instances

#GetOutput

data GetOutput

Data constructor for the getOutput function

Constructors

Instances

Modules