Skip to main content

Hide Address Fields


In some instances, you may want to hide the address inputs and subsequently unhide them when the user has selected a verified address. This makes it harder the user to input an incorrect address and bypass address verification.

Address Finder provides this functionality natively using hide. Specify which HTML Elements you would like to hide as CSS Selector or references. When the user selects an address, or address verification fails (no balance, limit reached, etc), the fields will unhide.

A clickable link will also be provided to allow the user to manually enter an address.

Custom Unhide Element

You can assign a custom element to serve as a clickable element to unhide the address fields. Use the unHide option.

The hide property is an array that contains the IDs of the form fields that should be hidden. In this example, #hiddenfields is specified, but you would need to replace it with the actual ID of the field you want to hide
apiKey: "ak_test",
hide: ["#hiddenfields"],
inputField: "#input",
outputFields: {
line_1: "#line_1",
line_2: "#line_2",
line_3: "#line_3",
post_town: "#post_town",
postcode: "#postcode"

Live Demo