EngageSoftware/elm-engage-common/8.2.6

NOTE: the latest version is 8.2.10

Engage.Form.Address

Form.Address

type alias Attribute =
InternalAttribute -> InternalAttribute

The Attribute type

type Msg field

The Msg type

type State parentField

The State type

= Name
| Address
| Unit
| Country
| Region
| ZipCode
| City
| AddressType
| Phone
| PhoneIsoCode
| Fax
| FaxIsoCode
| Website
| IsPrimaryAddress
| IncludeInExternalDirectory
| IncludeInInternalDirectory

The ValidationField type

addressTypes : AddressTypes -> Attribute

Get the address types Attribute

{ a | namespace : Namespace, localization : Localization }
-> Address
-> Html msg

Get the completed view

{ a | namespace : Namespace, localization : Localization }
-> List String
-> Address
-> Html msg

Get the completed view with additional

countriesToItems : Countries -> Dict String Item

Convert Countries to items dropdown

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

Get the form view

initialState : State parentField

Get the initial State

isEmpty : AddressLike a -> Bool

Check if the address is empty

isValid : State parentField -> Bool

Check if the state is valid

regionsToItems : Regions -> Dict String Item

Convert Regions to items dropdown

toAllRegions : RegionsCountry -> Regions

Convert RegionsCountry to Regions

Msg parentField
-> State parentField
-> Address
-> { state : State parentField
, data : Address
, cmd : Cmd (Msg parentField)
}

Update the address

(ValidationField -> parentField)
-> String
-> State parentField
-> RegionsCountry
-> Address
-> State parentField

Validate all fields

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

Validate all fields with a function

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

Validate a field with a function

{ a
| namespace : Namespace
, localization : Localization
, countries : Countries
, regions : RegionsCountry
}
-> AddressLike address
-> Html msg

Get the view

Attributes

countries : Countries -> Attribute

Get the countries Attribute

hideFax : Attribute

Get the hide fax Attribute

hideAddressName : Attribute

Get the hide address name Attribute

hideAddressPhone : Attribute

Get the hide address phone Attribute

Get the hide primary address checkbox Attribute

hideWebsite : Attribute

Get the hide website Attribute

regions : RegionsCountry -> Attribute

Get the regions Attribute

required : Bool -> Attribute

Get the required Attribute

Get the show include in external directory Attribute

Get the show include in internal directory Attribute

phoneNumberRequired : Bool -> Attribute

Get the phone number required Attribute

countryModifier : { a | country : Maybe ListItem } -> String

Get the country modifier