This is an archived page. The information on this archived page is no longer current.

Plugin examples

This plugin is deprecated and will receive no continued development.

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

  • Basic Usage
  • Plugin Deactivation
  • Custom Field Names
  • Missing Apartment Number
  • Return 5-digit ZIP Code
  • Return A Lot of Extra Data
  • Filter By ZIP Code
    (This will use additional lookups.)
  • Disable waitForStreet
    (Don't hide autocomplete suggestions before street is typed.)
  • Enable verifySecondary
  • Bad Modal Usage vs. Good Modal Usage
    (Hide the plugin UI elements when the form is hidden.)
  • Google Autocomplete
    (Disables the SmartyStreets autocomplete.)
  • Freeform Input
  • Multiple Forms on Tabs
  • Valid Autocomplete Suggestions
  • Set preferRatio
  • Programmatically Click Verify
  • Hide Checkmark
  • Two Forms
  • Prefilled Form

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. waitForStreet hides autocomplete suggestions until street information is entered.)

Happy path

The simplest, most traditional kind of address form

Submit

Street 2 Field

Traditional address form containing a street line 2 field

Submit

Freeform

The entire address in a single field

Submit

Two Freeform addresses

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

Submit

Two addresses

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


Submit

Incomplete address

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

Submit

onclick Handler

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

Submit

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

Submit event handler

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

Submit

Street 3 Field

Traditional address form containing street line 2 and line 3 fields

Submit

Street 4 Field

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

Submit

Country field

Non-US addresses should be allowed to pass thru freely

Submit

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

The leader in location data intelligence

Ready to get started?