Overview | Clearout Documentation (original) (raw)

  1. FORM GUARD

life-ringOverview

Real-time validation for online forms with support for email, phone, and name fields

The Clearout Form Guard facilitates seamless real-time field validations on forms. Form Guard allows you to quickly collect all valid leads while visitors fill out forms, helping to prevent missed chances and stopping fake leads from getting into your CRM (Customer Relationship Management system) and keeping setup easy even for non-developers.

Supported Form Field Validators

Validates email addresses for deliverability status and identifies business, disposable, role, and gibberish addresses.

Validates phone numbers of all types for correct format, length, and structure.

Validates a given name for profanity, gibberish, special characters, or numbers and disallows submission if found invalid.

To create and configure a Form Guard, follow these steps using Clearout's Form Guard Creation Wizard:

Click on Create Guard

Create Guard

You can provide the guard a meaningful name and description. This will reveal credit usage across guards. It also lets you categorize lead sources by guard name to see activity breakdown on the activitiesarrow-up-right page.

Follow the step-by-step wizard to configure your Form Guard

Here, you can decide which of your form's fields need to be validated. You can also take into account advanced settings to stop submissions that are fake or from bots.

Configure Form Guard Settings for Name, Phone Number and Email Validation

Generate a Form Guard code snippet.

Once you configure the field-level validation and advanced settings, Form Guard will generate a JavaScript code snippet that you can embed into your form page. This code snippet will validate each form input in real time, preventing bad lead data from entering your CRM.

Generate a Form Guard code snippet and Copy to validate on Forms

How is my Form Guard script protected from unauthorized use?

Form Guard only accepts validation requests from domains you've allowlisted in Advanced Settings. Requests from any other domain are rejected automatically, so your credits stay protected.

Installing Form Guard Script

Once your Form Guard code is generated, copy the snippet and paste it into the page containing your form. Form Guard will automatically load, detect your forms, and attach real-time validation to them. For other installation methods, see the section below.

Installing Form Guard Script

Form Guard can be installed on virtually any website or platform. Choose the installation method that matches your setup below.

Need a custom install?

If your setup requires custom configuration or doesn't fit the standard installation flow, reach out to our support team and we'll help you get set up.

Note on Content Security Policy (CSP)

If your site enforces a Content Security Policy, add the following directives so the Form Guard script can load and run:

The script behaves similarly to Google Analytics — if your CSP already permits GA, add Clearout the same way.

For static sites or any page where you have direct access to the HTML, paste the Form Guard snippet inside the tag (preferred) or just before the closing tag.

Form Guard is designed to work reliably in either location. Placing it in the is recommended for the cleanest setup, but adding it before works just as well and can be a good choice if you're optimizing page load order.

WordPress users have two straightforward options for adding the Form Guard snippet.

You can edit your theme's header.php file directly and paste the snippet inside the section. Keep in mind that this approach may be overwritten when your theme updates, so it's best suited for custom or child themes.

Alternatively, and recommended for most users, install a header and footer scripts plugin such as WPCode or Insert Headers and Footers. These plugins let you add the snippet through the WordPress admin without touching theme files, and your script will persist across theme updates.

If you manage multiple forms across your website, Google Tag Manager is the cleanest way to deploy Form Guard site-wide from a single dashboard.

Create a New Tag

Site-wide Integration of Form Guard with Google Tag Manager

Choose Tag Type as Custom HTML and Name the tag (eg, Clearout Form Guard)

Choose tag type as "Custom HTML"

Paste the entire Clearout’s Form Guard Snippet into the HTML box

Add Form Guard Snippet in the "custom HTML"

Choose when the Form Guard script is to be triggered (for example, All Pages). By default, Google Tag Manager is configured to trigger on all pages.

If you want more control over where Form Guard loads, you can customize this trigger to limit execution to specific pages or conditions.

Choose the trigger to Run Form Guard

Once the configurations are completed, click Save and then Submit to publish the changes to your website.

Use the live demos to see Form Guard in action on HubSpot, Unbounce, and Leadpages forms, and test how real-time validation behaves with valid, invalid, disposable, and gibberish email entries. This lets you preview the exact inline error messages and blocked submissions your visitors will see before deploying Form Guard on your forms.

Form Provider + Form Guard

Did you know?