EngageSoftware/elm-engage-common/8.2.3

NOTE: the latest version is 8.2.10

Engage.Form.Contact

Form.Contact

type alias Attribute =
InternalAttribute -> InternalAttribute

The Attribute type

type Msg field

The Msg type

type State parentField

The State type

= Prefix
| FirstName
| MiddleName
| LastName
| Suffix
| Email
| AddressName
| Address1
| Address2
| Country
| Region
| PostalCode
| City
| ContactType
| Phone
| PhoneIsoCode
| MobilePhone
| MobilePhoneIsoCode
| Fax
| FaxIsoCode
| Notes
| IsPrimaryContact
| IsBillingContact

The ValidationField type

completedView : Namespace -> Localization -> Contact -> Html msg

Get the completed view

completedViewWithAdditional : Namespace -> Localization -> List String -> Contact -> Html msg

Get the completed view with additional data

contactTypes : ContactTypes -> Attribute

Get the contact types Attribute

countries : Countries -> Attribute

Get the countries Attribute

countriesToItems : Countries -> Dict String Item

Convert Countries to an dropdown

-> Localization
-> (ValidationField -> parentField)
-> String
-> List Attribute
-> State parentField
-> Contact
-> Html (Msg parentField)

Get the form view

initialState : State parentField

Get the initial state

isEmpty : Contact -> Bool

Check if the Contact is empty

isValid : State parentField -> Bool

Check if the State is valid

regions : RegionsCountry -> Attribute

Get the regions Attribute

regionsToItems : Regions -> Dict String Item

Convert Regions to an dropdown

required : Bool -> Attribute

Get the required Attribute

Msg parentField
-> State parentField
-> Contact
-> ( State parentField, Contact, Cmd (Msg parentField) )

Update the Contact

(ValidationField -> parentField)
-> String
-> State parentField
-> Contact
-> State parentField

Validate all of the fields

List (Validator ( parentField, ValidationStatus ) Contact)
-> (ValidationField -> parentField)
-> String
-> State parentField
-> Contact
-> State parentField

Validate all of the fields with a function

List (Validator ( parentField, ValidationStatus ) Contact)
-> (ValidationField -> parentField)
-> String
-> Contact
-> ValidationErrors parentField

Validate a field with a function

-> Localization
-> Countries
-> RegionsCountry
-> Contact
-> Html msg

Get the view