Installing and using the QuickEmailVerification JavaScript widget is quite simple and does not require any extra skill except some basic knowledge of HTML and JavaScript. With just basic setup and minimum options, it starts working automatically. But you may want some extra workaround when you need some customization in the behavior or face some issue due to a misconfiguration of the widget. A few scenarios are covered here.

The form has multiple email fields but I want to register only a specific field

By default, the widget will detect and bind verification routines with all the email fields found on the page. But if the webpage on which you want to install the widget has multiple forms having email fields in each and you do not want to apply verification on all those email fields, you may choose to turn off the autoRegisterFields setting. Once it is turned off, a specific email field required to verify can be registered using the addListerner() method of the qev.api object. Check Properties and Methods to know about this method. Here is the example showing how to do it.

// Keep auto registration of email fields off
QuickEmailVerification = {
	pubKey: "d7cc39g74c85b31646f293b8f8f437",
	autoRegisterFields: false,
}

// Make sure that DOM is loaded before you try to add listeners to it
if (document.readyState !== "loading") {
  	var field = document.querySelector("input[id='email_field_to_register']");
	qev.api.addListerner(field);
} else {
	// If DOM is not loaded yet, bind our code to the DOMContentLoaded event
  	document.addEventListener('DOMContentLoaded', function () {
  		var field = document.querySelector("input[id='email_field_to_register']");
		qev.api.addListerner(field);
  	});
}

Getting 'CORS not enabled' error

When you notice the error like this in console,

Access to XMLHttpRequest at 'https://api.quickemailverification.com/c/v1/verify?pub_key=d7cc39g74c85b31646f293b8f8f437&email=support@quickemailverification.com&req_id=91141025141&sess_id=Fx18m2waTR7tvK4I' from origin 'http://yourdomain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
			

it's very likely that the domain on which you are using this widget does not match the domain you provided in the allowed_domain setting of application in your QuickEmailVerification account. Checking both the values and correcting the allowed_domain setting of your application should fix the issue.

Another possible cause of this issue could be the incorrect public key. Copy the public key from the code snippet provided on the application page and replace the public key of the widget you are trying to use.

Popup closed without any message

In real time email verification, response time is directly dependent on the response time of the email domain being queried. To avoid the disruption in the user experience, the QuickEmailVerification JavaScript widget by default drops the request execution after 60 seconds and in such case, the widget popup box is closed without showing any success or error message. In this situation, user form submission is also not intercepted and form will be allowed to submit.

Keeping "requestTimeout" more than a minute is not recommended because it can negatively affect the quality of user experience and increase the chances of abandoned forms.