canceraiddev/elm-form-builder/3.0.0

NOTE: the latest version is 28.0.1

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/CancerAidDev/elm-form-builder.

What we checked: The repo moved to github.com/CancerAidDev/elm-form-builder. Rebuilt with git archive from commit dcc63cf407f3 of https://github.com/CancerAidDev/elm-form-builder (zip prefix CancerAidDev-elm-form-builder-dcc63cf/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 96f55a9dc679f4fd1f1de2124ef9a38334252d6c.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/canceraiddev/elm-form-builder/zipball/3.0.0/

Form.Field

Field type and helper functions

Field

type Field
= StringField_ StringField
| MultiStringField_ MultiStringField
| BoolField_ BoolField
| NumericField_ NumericField
= SimpleField SimpleFieldProperties
| SelectField SelectFieldProperties
| HttpSelectField HttpSelectFieldProperties
| RadioField RadioFieldProperties
= MultiSelectField MultiSelectFieldProperties
| MultiHttpSelectField MultiHttpSelectFieldProperties
= CheckboxField CheckboxFieldProperties
| RadioBoolField RadioBoolFieldProperties
| RadioEnumField RadioEnumFieldProperties
= AgeField AgeFieldProperties
text : StringFieldProperties {} -> Field
email : StringFieldProperties {} -> Field
dateOfBirth : StringFieldProperties {} -> Field
datePast : StringFieldProperties {} -> Field
phone : StringFieldProperties {} -> Field
url : StringFieldProperties {} -> Field
textarea : StringFieldProperties {} -> Field
checkbox : BoolFieldProperties {} -> Field
radioBool : RadioBoolFieldProperties -> Field
radioEnum : RadioEnumFieldProperties -> Field
select : SelectFieldProperties -> Field
httpSelect : HttpSelectFieldProperties -> Field
multiSelect : MultiSelectFieldProperties -> Field
multiHttpSelect : MultiHttpSelectFieldProperties -> Field
radio : RadioFieldProperties -> Field
age : AgeFieldProperties -> Field

Properties

type alias AgeFieldProperties =
FieldProperties { value : Maybe Int }
FieldProperties {}
StringFieldProperties { tipe : SimpleFieldType }
StringFieldProperties
{ default : Maybe String
, options : List Option
}
StringFieldProperties
{ url : String
, default : Maybe String
, options : RemoteData (Error String) (List Option)
}
MultiStringFieldProperties
{ placeholder : String
, showDropdown : Bool
, options : List Option
}
MultiStringFieldProperties
{ placeholder : String
, showDropdown : Bool
, url : String
, options : RemoteData (Error String) (List Option)
}
StringFieldProperties
{ default : Maybe String
, options : List Option
, direction : Direction
}
type alias BoolFieldProperties a =
FieldProperties { a | value : Bool }
BoolFieldProperties { tipe : CheckboxFieldType }
FieldProperties { value : Maybe Bool }
FieldProperties
{ value : Maybe Value
, default : Maybe Value
, options : List Value
}
type alias StringFieldProperties a =
FieldProperties { a | value : String }

Getters

getBoolProperties : Field -> Maybe Bool
getEnabledBy : Field -> Maybe String
getLabel : Field -> String
getNumericValue : Field -> Maybe Int
getOrder : Field -> Int
getProperties : Field -> CommonFieldProperties
getStringValue : Field -> Maybe String
getUrl : Field -> Maybe String

Setters

setRequired : Bool -> Field -> Field
updateRadioBoolValue : Maybe Bool -> Field -> Field
updateRemoteOptions : RemoteData (Error String) (List Option) -> Field -> Field
updateMultiStringOption : Option -> Bool -> Field -> Field
maybeUpdateStringValue : Maybe String -> Field -> Field

Keep existing field if the value is Nothing

Predicates

isCheckbox : Field -> Bool
isColumn : Field -> Bool
isRequired : Field -> Bool

Encode

encode : Field -> Value

Metadata

metadataKey : String -> Maybe String