Documentation

 

Plugin examples

Sometimes it's really helpful to see some fully functional examples, so here you go.

And here are a few more to demonstrate a number of different use cases for the plugin:

(Note: In these examples we have set waitForStreet to true.)

Happy path

The simplest, most traditional kind of address form

Submit Form

Street 2 Field

Traditional address form containing a street line 2 field

Submit Form

Freeform

The entire address in a single field

Submit Form

Two Freeform addresses

One might be for shipping, the other might be for billing

Submit Form

Two addresses

Likely, one would be a billing address, and the other would probably be shipping


Submit Form

Incomplete address

When there's not enough information to verify an address, the fields shouldn't be mapped

Submit Form

onclick Handler

Submit button has an "onclick" attribute which should fire if the button is clicked

Submit Form

Two handlers

First the address should be verified, then the submit button's onclick handlers should fire, then the form's onsubmit handlers last

Submit Form

Submit event handler

Form submit() should fire verification, if necessary, THEN a handler bound to submit, THEN submit the form.

Submit Form

Street 3 Field

Traditional address form containing street line 2 and line 3 fields

Submit Form

Street 4 Field

Traditional address form containing street line 2, line 3, and line 4 fields

Submit Form

Country field

Non-US addresses should be allowed to pass thru freely

Submit Form

State dropdown menu

Option text must be a state (full name or two-letter state abbreviation). Also, if the first option is not a default value we will insert one for you.

Submit Form