Skip to main content

Code examples

Having trouble? Send us an email at support@addressfinder.com, and we will have a look. Be sure to include a link to your website, so we can see the page with the problem.

Phone verification widget in a modal

When working with an element such as a modal. The container attribute must be set to the modal's parent container. This ensures the icons and messages can be positioned and displayed correctly when the modal is shown and hidden.
View on CodePen

Customised styles for phone verification

Demonstrates how to adjust the text and border colours of the phone verification messages.
View on CodePen

Phone Verification Widget with custom Rules and Messages

The widget has been configured to enforce mobile and country related rules. The widget has also bee configured to display custom messages to the end user if/when the supplied number conflicts with the rules.
View on CodePen

Multiple widgets - Address, Email & Phone

The example shows the use of address, email and phone validation services all on the one page.
View on CodePen

Phone Verification collecting metadata

This widget verifies the supplied phone number and on successful verification, valuable metadata is collected.
View on CodePen

Phone Verification using 'Country Select' functionality

This widget watches a country select field and applies the two digit ISO code of the selected country to the phone verification query. This supports successful validation by allowing users to provide either a nationalised or internationalised phone number.
View on CodePen

Phone verification enable all countries

This widget has been configured to collect an international phone number and not restrict verification to any specific countries.
View on CodePen

Limiting phone validation to specific countries

This widget has been configured to only allow phone numbers form a select number of countries and all others will be rejected.
View on CodePen

HubSpot form integrated with Addressfinder's phone verification widgets

This is an example of Addressfinder's phone widget that has been integrated into a HubSpot form.
View on CodePen

Phone Verification country mapping

It is sometimes quite useful to be able to map a select option value found in the HTML to the required country code format that the Addressfinder Phone Widget expects. This code example will show you how to map HTML values using the countryMappings widget option.
View on CodePen