Allow your users to text their votes for a poll or survey created by Formidable Pro, or conditionally send SMS notifications when your entries are created or updated. Please note, you must have a Twilio account in order to use the Twilio add-on.

Download and Install

  1. Download the latest version of the Twilio plugin
  2. In your WordPress admin, go to "Plugins" → "Add New" and click the "Upload" link at the top of the page.
  3. Click the "Browse" button and select the zip file you just downloaded. Once the plugin is installed, click "Activate Plugin" or go to the "Plugins" page, find "Formidable Twilio" and click "Activate".
  4. Now that the plugin is activated, go to "Formidable" → "Global Settings" and click the "Twilio" tab.
  5. Insert your Twilio Account SID and Auth Token. You can find this information on your Twilio Account page. You'll need to use the API information from a live account and not a trial account.

Send text message on form submission

You may send users a text message when a Formidable form is submitted. Please follow the directions below to set up this feature.

  1. Create a form that will be used to send text messages. Include a Phone Number field in your form if you would like to send the message to the user filling out the form.
  2. Go to your form's Settings -> Form Actions tab. Click the phone icon to add an SMS action to your form. In the From box, insert your Twilio phone number. If your From number is an international number, you must include the international code. If you are using a Twilio test number, you must also send to a test number.
  3. Insert a phone number or your Phone Number field ID in the To box. You may insert multiple phone numbers, separated by a comma. A separate text will be sent to each phone number.
  4. Enter your message in the Message box. Click on fields in the Customization panel to add field values from the entry into your message.

Please note that you must have your Twilio Account SID and Auth Token saved on your Formidable "Global Settings" → "Twilio" tab in order for this to work correctly.

Set up text voting

Use Twilio to allow users to text responses to a poll or survey. The responses will be stored in your form's Entries.

  1. Create a poll or survey with a Formidable form. This form should have only one survey question. We recommend including a text field as well, to act as a catch-all for invalid votes.
  2. Log into your Twilio account and go the the Phone Numbers page.
  3. Go into edit the phone number you want to use to accept text votes. Change the Messaging URL to your-site-url/wp-admin/admin-ajax.php?action=frm_twilio_vote&form=5. Replace your-site-url with your site's URL. Change 5 to the ID of your form.
  4. Text away. Your users can either text the number position of the choice in your form, or the word itself. For example, if I have a poll for favorite colors and my choices are Red, Green, Pink, and Blue, and my favorite color is pink then I can text any of the following:
    • 3
    • Pink
    • pink
    • PINK

    If the field is a Dynamic field, only the ID of the linked entry will work. This vote will be applied to all fields in the form.

Undo phone formatting

When a phone number is prepared in this plugin, it is forced to be numeric. But if you are using a Twilio alphanumeric phone number, you will need to reverse this automatic formatting.

add_filter( 'frmtwlo_format_number', 'format_twilio_num', 10, 2 );
function format_twilio_num( $num, $args ) {
  return $args['original'];