Contact Form 7 verification

How to Add Phone Number Verification in Contact Form 7

Last updated on

by


Do you want to integrate Twilio in WordPress plugin Contact Form 7? Not sure how to verify phone numbers for all CF7 forms? You need form validation as a security measure because we all know that forms are an easy target for hackers. Letting people registering with a fake mobile number is quite risky. Somebody can crash your website by putting a ridiculous value into your form just because they felt like it.

This article will show you how to add phone number verification in contact form 7 using the Contact Form 7 – Twilio and SendGrid Integration plugin.

Setup Your Twilio Account

To verify phone number, first thing you’ll need is a Twilio account.

Twilio allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. You can use twilio with applications like WordPress and WooCommerce.

Go to the Twilio website and sign up for the free trial. On the SignUp page, you’ll be asked to enter your personal information. Then, you’ll need to verify your email address and your phone number.

twilio-verify-account

After that, select the products you want to use. In this case, it’s ‘SMS’ and ‘Identity & verification’. Then, select the ‘With minimal code’ option and ‘PHP’ below that.

twilio-signup-process

Once you enter your information, click ‘Get Started with Twilio’. After you sign up for an account, you’ll be taken to the Twilio dashboard. You need to click the ‘Get your first Twilio number’ button to get a phone number for your account. This will bring up a popup that contains your new number.

twilio-phone-number

If you like the number, then click ‘Choose this Number’ to keep it. Your Account SID, Auth token, and new Twilio number are also listed on this screen. You’ll need this information later, so keep this tab open.

twilio-project-info

Install and Activate Contact Form 7 – Twilio and SendGrid Integration

To verify Phone Number in Contact Form 7, we’re going to be using an automation plugin.

Contact Form 7 Verification is the best wordpress plugin for providing email and mobile number verification for all CF7 forms. People are always seeking ways to remove the possibility of a user registering with a fake email address and mobile number. Contact Form 7 Verification plugin is an add-on that provides an easy and effective way to remove fraudsters or non-serious clients from exploiting your services. Users cannot submit the form until the verification process is not completed. All you need is to enable Twilio and send grid verification to verify an email address and phone number.

Verify Phone Number in CF7 Form

After installing and activating the Contact Form 7 Verification plugin, you need to Go to Dashboard >> Settings >> Contact Verification Setting >> General Settings. In general settings set verification modal color according to your theme. Add email body text you want to show in email. To Verify email address, see our detail article How to Add Phone Number verification in contact form 7.

general settings

Contact Form 7 Verification use TWILIO API to send messages. Now got to Twilio Settings >> all you need to do is enable twilio verification, add twilio SID, Twilio Token, Twilio From Phone Number, and click on the Save button to save changes. You can get your twilio details from https://www.twilio.com/.

Twilio Settings

Now, whenever the user fills the form or click on the submit button verification code will be sent to the user’s given phone number and the phone number verification modal will be open. The user has to enter a verification code to proceed next.

Phone Verification Modal

We hope this article helps you to integrate Twilio and SendGrid in Contact form 7.  If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.­­