CSS selector which specifies the input field which the autocomplete interface should bind
Optional callback. This function is invoked when the autocomplete client has retrieved a full address from the API following a user accepting a suggestion. The first argument is an object representing the address that has been retrieved.
Optional callback. This function is invoked immediately after the user has selected a suggestion (either by click or keypress). The first argument is an object which represents the suggestion selected.
Invoked when the user unfocuses from the address input field
Invoked when autocomplete suggestion box is closed (i.e. hidden from user)
Optional callback. This function is invoked when checkKey
is enabled
and the key is discovered to be in an unusable state (e.g. daily limit
reached, no balance, etc).
Invoked when user selects or focuses address input field
Invoked when input is detected on address input field
Optional callback. This function is invoked when autocomplete has been successfully attached to the input element.
Invoked when autocomplete suggestion box is opened (i.e. presented to the user)
Optional callback. This function is invoked when an error has occurred
following an attempt to retrieve an address suggestion or full address.
The first argument is an error instance (i.e. inherits from Error
)
representing the error which has occurred.
Invoked when an address suggestion in suggestion box is selected
Optional callback. This function is invoked immediately after address suggestions are retrieved from the API. The first argument is an array of address suggestions.
An object specifying where address field data points should be piped.
Please find a complete list of address fields in the documentation. The
attribute of the document should be the same as the address attribute
as found in the documentation. E.g. line_1
, post_town
, postcode
. You
may use a CSS selector (string
) or array of CSS selector strings. E.g.
{ line_1: "#line_1"}
or { line_1: ["#line_1", "#premise"]
Optional. An optional field to remove organisation name from address
lines. Be aware that for some large organisation postcodes, the
organisation name is the only identifying premise element of an address.
This is false
by default.
An optional field to convert the case of the Post Town from upper case
into title case. E.g. "LONDON"
becomes "London".
Default is false
An optional field to check whether the key is usable against the Ideal Postcodes API. This should be used in conjunction with the
onFailedCheck
callback to specify the necessary behaviour when the API Key is not in a usable state. This isfalse
by default.