canceraiddev/elm-form-builder/24.0.0

NOTE: the latest version is 28.0.1

Form.Field.FieldType

Field Type

FieldType

= StringType StringFieldType
| MultiStringType MultiStringFieldType
| BoolType BoolFieldType
| IntegerType IntegerFieldType
= SimpleType SimpleFieldType
| DateType DateFieldType
| Select
| SearchableSelect
| HttpSelect
| HttpSearchableSelect
| Radio
= Text
| Email
| Phone
| Url
| TextArea
| Time
= CheckboxType CheckboxFieldType
| RadioBool
| RadioEnum
= Checkbox
| CheckboxConsent
type alias IntegerFieldType =
{ min : Maybe Int
, max : Maybe Int
}
= MultiSelect
| SearchableMultiSelect
| MultiHttpSelect
| Tags
type alias DateFieldType =
{ min : Maybe DateConfig
, max : Maybe DateConfig
, default : Maybe DateConfig
}
= DateAbsolute Posix
| DateOffset ( Interval, Int )

Decoder

decoder : Decoder FieldType

Helpers

dateConfigToString : Posix -> DateConfig -> String
toClass : FieldType -> String
toMax : Posix -> FieldType -> Maybe String
toMaxLength : FieldType -> Maybe Int
toMin : Posix -> FieldType -> Maybe String
toType : FieldType -> String
dateDefault : DateFieldType
dateOfBirth : DateFieldType
datePast : DateFieldType
dateFuture : DateFieldType
defaultInt : IntegerFieldType
age : IntegerFieldType