JavaScript Widget
Real-time Email Validation on Forms (Deprecated; use Form Guard)
The Clearout JavaScript Widget comes in handy for non-developers to easily integrate real-time verification into all kinds of online forms. This will let a user capture all valid prospects right at the time of form filling, avoiding the loss of any opportunity
Important note
The JavaScript Widget is no longer supported. We recommend using Form Guard for best features and support

JavaScript Widget 2.0 - Live Demos
Clearout JavaScript widget comes as a simple way to bring real-time email address verification to any online forms that capture the email addresses. The widget can be configured to handle what kind of email address is to be considered valid. Below page link shows how the Clearout JavaScript widget has enhanced the HubSpot, Unbounce, and LeadPages forms to capture only the leads with the valid email address
Getting Started with JavaScript Widget
Create your JavaScript widget from the Apps page by clicking on 'Create App' and by choosing run type as 'Client.' When creating Clearout Apps, you'll need to choose how and where to validate. This helps prevent the mishandling of credits and abuse by setting access thresholds across domains, URLs, and/or IPs.
The app screenshots illustrated on this page may be irrelevant due to the fact that the JavaScript Widget has been deprecated and is no longer supported.

Security Configuration:
Limit Usage:
You can take full control in avoiding abuse by limiting the usage by applying a rate limit on IP addresses. This will further help in using the credits effectively. It is always advisable to specify a rate limit either at a global level or at a minute interval. Failing to do so might deplete the credit balance sooner. There will be no limits applied by default.

Get your JavaScript Widget up and working:
Once the client-side app is created, you will be given a code snippet with the corresponding API token that needs to be inserted anywhere before the closing body tag. Upon saving the snippet as a component of the form, the client-side app begins verifying the emails.
With the mentioned snippet's basic settings, you can capture the valid business email addresses. In case you wanted to accept free accounts or other such accounts, you can make use of the advanced settings.
Things to remember
In case the account used to generate the app token runs out of credits, the form submissions will be allowed without email validation
In case of throttle limits are exceeded, the form submissions will be allowed without email validation
Advanced Settings:
Once the code snippet is generated, you can specify the settings for the widget against the 'opts'. Initially, the code snippet only contains 'app_token', which is the user identifier, and 'mode', which is configured to ajax by default. These settings are enough to make the widget work. You can configure the additional settings as follows;
Impact of Emails or Domains Allowlist/Blocklist Settings
In case of an incoming email address or domain is already part of allowlist or blocklist then the verification outcome will be based on that. Above setting options wont have any impact during the verification.
reCAPTCHA:
Google reCAPTCHA (v3) helps to prevent hackers from abusing the system, as it blocks bots from submitting fake or nefarious online requests.
Captchas can be used to
Protect the integrity of online forms by stopping abusers from sending in repeated false responses
Prevent abusers from signing up for multiple accounts
So, a captcha with real-time email validation would generate genuine leads. To enable Google reCAPTCHA (v3), you need to generate a site key and a secret key from Google

Adding Email Validation to a Specific Form
In case a page has many forms, and you are looking to enable Clearout email validation to a specific form, then it requires passing the form element as part of the initialization, as mentioned below
Find the form element for which the Clearout email validation needs to be added
Pass the form element as the third parameter in the clearout.push() initialization method
Adding Email Validation to Asynchronous or Deferred Form
In case the form on the page is set to be rendered dynamically, then wait for the form element to be available before adding it to the Clearout email validation.
Email Validation on Popup Forms during Form Submission
Most pop-up form providers will render the form dynamically, and even the form submit button would be a custom button created using the <DIV> tag.
In that case, adding clearout validation to the form requires the mode to be 'formSubmit' rather than 'ajax'; also, to handle the custom submit button, it is necessary to take over the button click with a transparent overlay before the actual form submission occurs. The steps below illustrate how to take over the form submit button and then attach validation to the form
Switch off the auto-validation mode. Adding Clearout's JS Widget will auto-detect the email fields by default and attach the validation. This can be disabled by setting the 'auto_validation' option to 'false.'
Specify which form & submit button on the page requires validation by setting the form options as mentioned below:
Please change the option values according to your form setting, since the below values are only for reference.
Pass the form option (formOpts) to the Cleaout emailValidator service method attachToForm() is part of the widget on_ready callback, as mentioned below.
The final snippet of code would look something like below and needs to be inserted on the page where the form will be rendered.
Note: Please contact [email protected], if none of the above methods help you integrate Clearout email validation on the form
Integrate custom email validation using the verify() method.
Use the clearout.emailValidator.verify() method at your disposal in situations where you need to implement your own form validation with Clearout's real-time email validation for the email field. To find out more about the integration, please take a look at the code example below.
Note: Please contact [email protected], if none of the above methods help you integrate Clearout email validation on the form
Customizing Feedback Error Message
If you want to change the error message text or apply the styling, please check all the options that start with feedback, as they are of HTML string type, so feel free to update the text that suits your requirement and use inline HTML style or classname to change the look and feel.
Check out the code snippet and screenshot below to see how the feedback message text and styling have been modified.

Activate/Deactivate the apps:
If you want to disable any app temporarily, you can click on the toggle button against the app under the status column. Verification will not be carried out as long as the status of the app remains 'Inactive.' You can resume the verification by turning the toggle to an active state.

Deleting the unused/old apps:
Any unused app can be deleted by clicking the delete icon against the app. On hovering over the app name, the Delete(Bin Icon) option will be visible.

Reset/Regenerate the Token:
Whenever an abuse is identified while you are still in control of the usage, you may reset the app token. Resetting any app token provides two options:
Deactivating the existing token in use. The token will expire immediately (in case of abuse is identified)
Keep the already active token working for an hour post-resetting (which might be helpful in case of migrating to a newer setup). Once the first hour completes, the old token will not work.

It is always advisable to choose 'Expire Immediately' if any sort of abuse is identified. On successful resetting of the token, make sure to update the form code with the new token.
Last updated
Was this helpful?


