Skip to main content

πŸ“± Phone Number Verification (SMS Code)

What is phone number verification?​

Phone number verification makes respondents prove that the phone number they typed is really theirs. FormNX texts a 6-digit code to the number, the respondent types the code into the form, and only then can they submit.

The Phone field already checks that a number has the right format for its country. Verification goes one step further: it confirms the respondent can receive texts at that number.

It's useful when a wrong number costs you something:

  • Leads and callback requests, so your sales team only calls numbers that ring.
  • Appointments and bookings where you send reminders by text.
  • Sign-ups, giveaways and registrations where fake or mistyped numbers are a problem.

The texts are sent through your own Twilio account. You connect it once in your workspace settings, and Twilio bills the messages to that account.

Business plan

Phone number verification is available on the Business plan. On other plans, the SMS Providers tab in your workspace settings shows an upgrade prompt, and the Phone verification option on the Phone field shows an Upgrade badge.

What you need​

  • A FormNX Business plan.
  • The Admin role in the workspace, to add the SMS provider.
  • A Twilio account with:
    • your Account SID and Auth Token (both are on your Twilio Console dashboard), and
    • either a Twilio phone number that can send SMS, or a Messaging Service.
  • An upgraded (paid) Twilio account to send real codes. Twilio free trial accounts can't send verification codes, but you can try the whole setup with Test mode.

Step 1: Add an SMS provider to your workspace​

info

Only workspace admins can add, edit or delete SMS providers.

  1. Open Manage Workspace for the workspace your form is in.
  2. Click the SMS Providers tab.
  3. Click Add SMS Provider.
  4. Fill in the details:
    • Name: a label for this provider, for example My Twilio Account. You'll pick it by this name in the form builder.
    • Provider: Twilio. It's the only provider for now.
    • Account SID: your Twilio Account SID. It starts with AC.
    • Auth Token: your Twilio Auth Token. It's stored encrypted and never shown again.
    • From Number: the Twilio phone number to send the SMS from, in international format, for example +1234567890.
    • Messaging Service SID: instead of a From Number, you can enter your Twilio Messaging Service SID. It starts with MG.
    • Test mode: leave this off for real use. See Test mode below.
  5. Click Save.

Fill in either a From Number or a Messaging Service SID. One of the two is required.

FormNX checks your details with Twilio​

When you save, FormNX asks Twilio whether the details are correct. The provider isn't saved if:

  • Twilio rejects the Account SID or Auth Token.
  • The From Number isn't a phone number in that Twilio account.
  • The Messaging Service SID isn't found in that Twilio account.

Check the details in your Twilio Console and try again.

Your list of providers​

Saved providers are listed in the SMS Providers tab with their name, provider, Account SID (partly hidden) and the number or Messaging Service they send from.

  • You can add up to 6 SMS providers per workspace, for example one Twilio account per client.
  • To edit a provider, click its edit button. The Auth Token box is empty and says Leave blank to keep the saved token. Type a token only if you want to replace it.
  • To delete a provider, click its delete button.

Test mode​

Test mode lets you try phone verification without sending any SMS. Tick Test mode on the provider to turn it on.

While test mode is on:

  • No SMS is sent. Nothing is sent through Twilio, so nothing is billed.
  • The code is always 000000.
  • Your Twilio details aren't checked when you save the provider. You can try the feature with a Twilio free trial account, or before you have a Twilio account at all. The full check runs when you save the provider with test mode off.
  • The provider shows a Test mode badge in the SMS Providers list.
  • On the form, after a respondent clicks Send Verification Code, the form says that test mode is on and that the code is 000000. Nothing about test mode shows before that click.
Turn test mode off before you share the form

While test mode is on, anyone can verify any phone number with 000000. Use it only to try the form yourself. Before you share the form for real, edit the provider, untick Test mode, and save it with your real Twilio details.

Why test mode exists​

Twilio free trial accounts can only send Twilio's own predefined message templates, and only to a few phone numbers you've verified in Twilio. They can't send a custom text like a verification code, so a trial account can't deliver a real code. Upgrade your Twilio account to send real codes. Until then, test mode lets you build and check your form.

Step 2: Turn on verification for a Phone field​

  1. Open your form in the form builder.
  2. Click the Phone field to open its settings.
  3. Tick Phone verification.
  4. Under SMS provider, choose the provider that sends the code.
    • If the workspace has only one provider, it's picked for you.
    • Just added a provider in another tab? Click the refresh button next to the list to reload it.
    • No providers yet? The builder shows No SMS providers in this workspace yet. with an Add SMS Provider link that opens the SMS Providers tab.
  5. Save your form.

The form can't be saved while Phone verification is on and no SMS provider is chosen.

Limit the field to the countries you expect

In the Phone field's country list, add only the countries you expect respondents from. FormNX won't send a code to a number from any other country. See Protect your Twilio balance.

What respondents see​

  1. The respondent types their phone number and clicks Send Verification Code.
  2. A reCAPTCHA "I'm not a robot" box appears. Ticking it sends the SMS.
  3. The respondent gets a text like this:

    123456 is your verification code for Job Application. It expires in 10 minutes.

  4. The form shows Enter the 6-digit code we sent to [number] and six boxes. The respondent types the code. Pasting the code works too, and on phones the keyboard can often fill it in straight from the SMS.
  5. When the code is right, the form shows Phone number verified.

A few things to know:

  • The form can't be submitted until the number is verified. Respondents who try see Please verify your phone number.
  • Optional fields: if the Phone field isn't required and the respondent leaves it empty, no verification is needed.
  • Changing the number: the Change link next to the button or the verified message starts over. Changing the number or the country after verifying also resets verification, so the new number must be verified too.
  • reCAPTCHA every time: each code sent, including a resend, needs a fresh tick in the reCAPTCHA box. This stops bots from sending texts on your Twilio account. You don't need to turn on Google reCAPTCHA for the whole form.
  • The SMS text is fixed and sent in your form's language. The form name in the text is your form's name.

Code rules and limits​

RuleLimit
Code length6 digits
Code valid for10 minutes
Wrong tries per code5. After that, the respondent must request a new code
Wait before resending60 seconds. The button counts down, then shows Resend Code
Codes per phone numberUp to 5 per hour

There are also limits per device, so one visitor can't request codes for many numbers in a row. If a limit is hit, the respondent sees a message such as Too many codes requested for this number. Please try again later.

Protect your Twilio balance​

Every code is a real SMS billed to your Twilio account. Some bots fill in forms with expensive phone numbers just to run up texting bills, which is called SMS pumping. FormNX already blocks most of this with reCAPTCHA and the limits above. Three more steps make it safer:

  1. Limit the Phone field to the countries you expect. If the field's country list is limited, FormNX refuses numbers from other countries and sends no SMS. Respondents see Phone numbers from this country are not accepted on this form. If the list is empty or set to all countries, any country is accepted.
  2. Turn on Geo Permissions in Twilio. In your Twilio Console, allow SMS only to the countries you need.
  3. Turn on SMS Pumping Protection in Twilio. Twilio can block traffic that looks like SMS pumping before it's sent.

Saved progress and editing responses​

  • Save Your Progress: if a respondent verifies their number and saves the form to finish later, the number stays verified for 24 hours. After that, they verify it again when they come back.
  • Editing a submitted response: editing an already-submitted response doesn't ask for a code.

Frequently asked questions​

Does FormNX charge for each SMS?​

No. The texts are sent from, and billed to, your own Twilio account at Twilio's prices. Check your Twilio Console for usage and costs.

Can I use a Twilio free trial account?​

Only with Test mode on. Trial accounts can't send custom texts like verification codes, so you need to upgrade your Twilio account before you share the form for real.

Which SMS providers are supported?​

Twilio, for now. You can connect several Twilio accounts to one workspace, up to 6.

Can I change the SMS text?​

No. The text is fixed: [code] is your verification code for [form name]. It expires in 10 minutes. The code comes first so phones can offer to fill it in.

A respondent didn't get the code. What can they do?​

  • Check that the number and country are right. Use Change to fix them.
  • Wait for the 60-second countdown, then click Resend Code.
  • As the form owner, check the message logs in your Twilio Console. Twilio may have blocked the country (Geo Permissions) or the number.
  • Make sure the provider isn't a Twilio trial account, and that Test mode is off if you expect a real SMS.

Is the verified number saved with the response?​

The phone number is saved as usual. Verification only controls whether the form can be submitted.

What happens if I move to a plan without phone verification?​

Verification turns off on your forms. The Phone field works as a normal phone field and respondents can submit without a code. Your SMS providers stay saved.

Can I verify email addresses too?​

Yes. The Email field has its own Email Verification (OTP), which sends a code by email.