Introduction
By default, GSheetConnector for WPForms Pro sends every form submission to your Google Sheet. But in many real situations, you may not want to send all entries. For example, you may want to send only entries with a company email address, or skip entries that are empty or incomplete.
The Conditional Logic option helps you control this. Before sending an entry, the plugin checks the conditions you have set. If the entry matches your conditions, it is sent to Google Sheets. If not, it is skipped.
When Should You Use Conditional Logic?
- You want to send only the entries from a specific email domain (for example, only company emails).
- You want to stop test or unwanted entries from going to your Google Sheet.
- You want to send entries only when a particular field is filled in.
- You want to send entries only when a message contains a specific word.
How to Enable Conditional Logic
Follow the steps below to enable Conditional Logic for your form:
- Go to WPForms → All Forms and click Edit on the form you want to configure.
- In the form builder, click on Settings from the left sidebar.
- Select GSheetConnector Pro from the settings menu.
- Scroll down to the Conditional Logic section.
- Turn on the Enable Conditional Logic toggle. The condition options will appear below it.
- Set your conditions (explained in the next section).
- Click on the Save button at the top right corner of the builder.
Understanding the Condition Options
After enabling Conditional Logic, you will see a sentence like this:
[Send / Don’t send] to google sheet if [Field] [Operator] [Value]
Let us understand each part one by one.
1. Send / Don’t send
This option decides what happens when your conditions are matched.
- Send: The entry is sent to Google Sheets only when the conditions are matched.
- Don’t send: The entry is not sent to Google Sheets when the conditions are matched. All other entries are sent.
2. Select Field
This dropdown shows the form fields you can use in your condition. Choose the field you want to check, for example Email or Comment or Message.
3. Operator
The operator decides how the field value is compared with the value you enter.
- is: The field value is exactly the same as the value you enter.
- is not: The field value is different from the value you enter.
- empty: The field has been left blank. You do not need to enter any value.
- not empty: The field has been filled in. You do not need to enter any value.
- contains: The field value includes the text you enter anywhere inside it.
- does not contain: The field value does not include the text you enter.
- starts with: The field value begins with the text you enter.
- ends with: The field value ends with the text you enter.
- greater than: The field value is greater than the number you enter.
- less than: The field value is smaller than the number you enter.
4. Value
Type the text or number you want to compare with in the value box. For the operators empty and not empty, no value is needed.
5. And, Or and Add New Group
You can add more than one condition to make your rule more specific.
- And: Click the And button to add another condition in the same group. The entry is sent only when all the conditions in that group are matched.
- Add New Group: Click this button to add a new group of conditions. Groups are separated by or, so the entry is sent when any one of the groups is matched.
- Delete (trash icon): Click the red trash icon to remove a condition you no longer need.
Examples
Example 1: Send Only Gmail Entries to Google Sheets
Suppose you want only the entries with a Gmail address to be added to your sheet.
- Turn on Enable Conditional Logic.
- Select Send in the first dropdown.
- In the field dropdown, select Email.
- In the operator dropdown, select ends with.
- In the value box, enter @gmail.com.
- Click Save.
Result:
- john@gmail.com is added to the Google Sheet.
- john@yahoo.com is not added to the Google Sheet.
Example 2: Don’t Send Test Entries
If your team often submits test entries with a test email, you can block them.
- Turn on Enable Conditional Logic.
- Select Don’t send in the first dropdown.
- In the field dropdown, select Email.
- In the operator dropdown, select contains.
- In the value box, enter test.
- Click Save.
Result: Any entry where the email contains “test” is skipped. All other entries are sent to the sheet.
Example 3: Send Only When the Message Is Filled In
- Turn on Enable Conditional Logic.
- Select Send in the first dropdown.
- In the field dropdown, select Comment or Message.
- In the operator dropdown, select not empty.
- Click Save.
Result: Only the entries where the visitor has written a message are added to the sheet.
Example 4: Use Multiple Conditions with “And”
Suppose you want to send an entry only when the email ends with your company domain and the message contains the word “quote”.
- Turn on Enable Conditional Logic and select Send.
- Condition 1: Email → ends with → @yourcompany.com
- Click the And button to add a new condition.
- Condition 2: Comment or Message → contains → quote
- Click Save.
Result: The entry is sent to Google Sheets only when both conditions are true.
Example 5: Use Multiple Groups with “Or”
Suppose you want to send an entry if the email ends with either Gmail or Outlook.
- Turn on Enable Conditional Logic and select Send.
- In the first group, set Email → ends with → @gmail.com.
- Click on Add New Group.
- In the new group, set Email → ends with → @outlook.com.
- Click Save.
Result: The entry is sent to Google Sheets if it matches at least one of the two groups.
- If the Conditional Logic toggle is turned off, all form submissions will be sent to Google Sheets.
- The Name field is not available in the Select Field dropdown.
- Conditions are checked when a new form is submitted. After saving, submit a test entry to confirm that your condition works as expected.
- Always click Save in the form builder after changing the conditions, otherwise your changes will not be applied.
Test Your Conditional Logic
- Open the page where your WPForms form is published.
- Submit one entry that matches your condition.
- Submit another entry that does not match your condition.
- Open your connected Google Sheet.
Frequently Asked Questions
What is Conditional Logic in GSheetConnector Pro for WPForms?
Conditional Logic lets you decide which form entries are sent to your Google Sheet. The plugin checks your conditions on every submission and sends or skips the entry accordingly.
What is the difference between Send and Don't send?
Send sends the entry to Google Sheets only when the conditions are matched. Don’t send skips the entry when the conditions are matched and sends all other entries.
Why is the Name field not showing in the Select Field dropdown?
The Name field is not available for Conditional Logic in this section, so it does not appear in the dropdown. You can use other fields, such as Email or Comment or Message, to set your conditions.
What is the difference between And and Add New Group?
And adds another condition in the same group, and all conditions in that group must match. Add New Group adds a separate group joined with or, and the entry is sent if any one group matches.
Do I need to enter a value for the empty and not empty operators?
No. The empty and not empty operators only check whether the field is blank or filled in, so no value is needed.
Why are some of my entries not appearing in Google Sheets?
If Conditional Logic is enabled, only the entries that follow your condition are sent to the sheet. Check your conditions, or turn off the Enable Conditional Logic toggle to send all entries.
Why is my Conditional Logic not working after I changed it?
Make sure you clicked the Save button in the WPForms builder after changing the conditions. Then submit a new test entry to check the result.
What happens if I turn off Conditional Logic?
All form submissions will be sent to your connected Google Sheet, without any condition check.