Intro image by blog article How to Use Conditional Logic with Forms in WordPress
How to Use Conditional Logic with Forms in WordPress
Guide10 Min.

How to Use Conditional Logic with Forms in WordPress

If you want to learn more about WordPress forms with conditional logic, you’re in the right place. This blog post will explore why and how to use them!

Forms are an extremely important tool for business owners, agencies, and WordPress users because they ultimately support marketing, customer experience, and sales functions, to name a few. However, whether you’re creating a contact form or a survey, your form needs to be smart and intuitive. Not only will that positively impact your user experience, but it will also show a direct impact on your form conversions.

WordPress forms with conditional logic will take your form game to a whole new level by allowing you to create smart forms that delight your users and drive the results you’re looking for.

Read on as we walk you through how to use Tripetto to implement conditional logic in your WordPress forms and explain why it is the best choice for building website forms.

But first, let’s recap a few basics.

What is Conditional Logic?

Suppose you want to create smart, powerful forms for your WordPress site that retrieve invaluable data and possibly lead to a boost in conversions and/or increased form completions.

In that case, conditional logic is the way forward.

In short, conditional logic empowers you to build smart forms to collect information about your audience. But, best of all, conditional statements also enable WordPress forms to dynamically change based on how users respond to different sections of your forms. Furthermore, with plugins, you can master all of this without any HTML, PHP, JavaScript, or CSS knowledge.

Using a Plugin to Create WordPress Forms with Conditional Logic

Using a form builder plugin that supports conditional logic, such as Tripetto, simplifies the form creation process and comes with some additional benefits:

  • You don't need multiple forms for multiple use cases
  • You offer end-users a more intuitive and pleasant experience because forms are quicker and easier to complete, which enhances how customers feel about your brand and how they engage with it
  • Thanks to the previous point, you're more likely to see an increase in both conversion rates and form completion rates

That said, before we go any further, let’s clarify the three different types of conditional logic:

1. Simple Conditional Logic

This is the most common type of conditional logic and the more basic of the three. Here's how it works:

Depending on the user’s selection, your form hides or shows fields, often from a dropdown menu. This is often called the 'IF/THEN' condition.

For example, if your form asks the user whether they want to be contacted, a field to input their email address appears if they tick the “yes” checkbox.

Another example might be when you create an appointment form, where the user is first asked if they want to book an appointment. Then, once they select ‘Yes,’ they’re then asked to specify from a dropdown menu who they want to schedule their appointment with, on which date, and at what time. Once these conditions are met, a confirmation email is sent.

2. Complex Conditional Logic

In contrast, complex conditional logic is also known as the 'AND/OR' condition. This comes in handy if you need more than just one conditional logic rule, as you can insert as many conditions as you’d like in your form.

Using OR logic, you can make a field disappear or appear when at least one of your conditions is met. For example, if you had a rating field between one and five stars and your user awards you either four or five stars, this could trigger a pop-up asking them to fill out a review.

Similarly, if you want to create an appointment form, where the user is first asked to book an appointment, if they select ‘YES’ and select a date, this could trigger a confirmation email only once the user’s ticked both boxes.

3. Recurring Logic

Recurring logic allows you to repeat certain questions for multiple items that a respondent has selected from a multi-select question. So, let's say for example you ask respondents, ‘what are your favorite colors?’, and they select 'blue' and 'yellow', recurring logic would generate the same set of questions for each of the selected colors, for example: ‘Why do you like blue?’ followed by ‘why do you like yellow?’.

How is Conditional Logic Used in Forms

Now that we’ve covered the basics, let’s look more closely at how you can use Tripetto’s conditional logic features within your WordPress forms.

Here are a few examples:

Product Evaluation

For product evaluation, you could use Tripetto’s ‘Chat Form’. This is created in the style of an online chat between your business and the product reviewer/customer. In this instance, you could ask the customer to click “Start Evaluation”, and a chat bubble would appear asking the customer to provide their name before evaluating the product.

Then, more chat bubbles would appear, asking the customer to select which products they’ve used in the last three months. Once they’ve chosen the products in question, the chat form automatically sends further queries related to that product.

Needless to say, the ‘Chat Form’ is a very engaging way of gathering customer feedback to improve customer satisfaction and product quality.

A screenshot of a product evaluation form in Tripetto.
Product evaluation form in Tripetto.

Order Form

Another example of recurring logic is Tripetto’s ‘Classic Form’ face; you can create smart order forms that calculate the prices of selected products and services. That way, the end-user doesn’t have to go to the trouble of manually calculating the total cost.

A screenshot of an order form in Tripetto.
Order form in Tripetto.

Screening for Covid-19

With Tripetto’s ‘Autoscroll’ form, you can build a screening tool to respond to Covid-19 symptoms.

For instance, users could be asked to click either of these options:

They are experiencing at least one of the listed Covid-19 symptoms
They don’t have any of the listed symptoms

If they select the first option, they would be directed to a page that advises them to seek medical advice. Whereas, by choosing the second option, they would be directed to a page that asks them a series of additional questions about their age and other symptoms they’re experiencing.

This example uses the Autoscroll form face in a left-right horizontal scroll direction:

A screenshot of a Covid-19 screening form in Tripetto.
Covid-19 screening form in Tripetto.

The above are just a few examples of the many ways your business can use conditional logic to create different forms that meet your website’s bespoke needs. You could also create forms to take restaurant reservations, manage RSVP invitations, calculate BMI - and much more!

How to Choose the Right WordPress Plugin That Supports Conditional Logic

If you’ve already done some research in this area, you may already know that there are many WordPress form builder plugins that provide conditional field functionalities. However, it’s essential to choose one that ticks all the boxes for your business needs.

In the case of Tripetto, users have access to a simple-to-use yet feature-rich WordPress plugin. Some of its standout hallmarks include:

  • A simple drag and drop, flowchart-based interface. This makes creating flows from a virtual drawing board easy, which massively simplifies the creation of logic branches—all the while giving you a birds-eye view of your flow’s overall structure.
  • Advanced logic. Advanced logic will enable you to build interactive and conversational forms, to enhance engagement. These allow you to perform powerful real-time actions that consistently calculate, assess, and respond to user input. All of which can be easily encoded with the builder.
  • Rich customization options. Not all forms need to look the same - you can customize forms depending on the use case. You can customize fonts, colors, screen background, selection tools, hide Tripetto’s branding, and more.
  • Three form faces. Tripetto’s form faces offer diverse layouts (autoscroll, chat, and classic). You can use these to completely change the look and feel of your forms according to your use case and audience. For instance, a ‘Chat Face’ may present different questions in the form of a chatbox, whereas an ‘Autoscroll Face’ will display one question at a time.
  • Complete control. All collected data is stored in your WordPress database.
  • Abundant automations. All logic features are included by default, and you’ll receive form completion notifications via Slack or email and connect to 1000+ services via Zapier, Make, Pabbly Connect, or custom webhooks. You can also track form completion using Google Analytics and your Facebook Pixel. This data is crucial for pinpointing where users are dropping-off so that you can optimize your form strategy.
  • Customers first. Outstanding customer support, clear self-help documents, and step-by-step tutorials.

Tripetto, WordPress Forms, and Conditional Logic

As you may have already deducted from the previous section, Tripetto is a unique form builder for WordPress sites. It delivers stellar forms to end-users while providing form creators an intuitive drag and drop experience. One of Tripetto’s most attractive aspects is that no coding knowledge or experience is required to build smart conversational forms.

Rather than creating one-size-fits-all forms, with Tripetto, you can make smart, dynamic forms that are fun for website visitors to complete. Often, these feel more like having a conversation than completing a chore. In other words, you can publish forms that react to user input, triggering the next series of relevant questions/form fields.

Tripetto builds on traditional conditional logic features by adopting three main types of logic, which all come standard with Tripetto:

1. Branch Logic

Branch Logic is sometimes called logic flows, and/or routing, or question logic. But, put simply, Branch Logic directs the right follow-up questions to respondents based on their earlier answers. Using Tripetto’s ‘culling modes,’ you can either ask a straightforward follow-up question or an entirely new set of questions. You can also expand this further by adding other follow-up questions for each additional selected answer.

A screenshot of branch logic in Tripetto's form builder.
Branch logic in Tripetto's form builder.

2. Jump Logic

Similar to Branch Logic, Jump Logic is sometimes called Routing or Logic Jumps. This conditional logic form permits respondents to skip parts of your form that aren't relevant to them and move onto other selected points. However, you can still ensure that some entries remain ‘required fields’ to guarantee you collect the data you need. In some cases, this type of jump may take a respondent straight to the end of the form without needing to answer any additional questions.

A screenshot of jump logic in Tripetto's form builder.
Jump logic in Tripetto's form builder.

3. Pipe Logic

Pipe Logic is also called answer merge codes, piping, and/or recall information, or question piping. It enables you to personalize your forms by using data given in earlier questions and (where relevant) to display it in future questions. This works wonders for boosting completion rates.

A screenshot of piping logic in a Tripetto form.
Pipe logic in a Tripetto form.

Tripetto’s Smart Features

In addition to WordPress forms with conditional logic, Tripetto brings several other competitive features to the world of forms and allows you to:

  • Personalize closing messages: You can tailor your form’s closing message to respondents based on their answers. It’s another way of reducing boredom and providing users with a more engaging experience.
  • Process advanced calculations with given answers: This comes in handy for things like calculating prices for product lists, counting quiz scores, applying discounts with coupon codes, performing formula estimates, calculating a BMI score, and so on.
  • Set and manipulate form data: There are three ways you could do this:
    1. Hidden field block: This can help you gather and save hidden form data.
    2. Custom variable block: This allows you to store a hidden value inside your forms, such as a number, text, boolean value, or date.
    3. Set value block: This can change field values and variables inside your form. For example, to prefill values or lock entered values.
  • Send emails: Tripetto forms can send emails to both you and your respondents. For example, if someone joins your mailing list, you might receive a notification email, and the subscriber might receive a confirmation email.
  • Block form submissions: There are two ways you can do this:
    1. Force stop block: This prevents a form from being submitted if a condition isn’t met. For example, if a survey respondent doesn’t meet the prerequisites, a notification message is generated to inform the user that they don’t fit your target audience.
    2. Raise error block: This displays an error message that prevents the form from submitting. For example, if a respondent enters an email address incorrectly, an error block message appears. Hopefully, this will prompt the respondent to re-enter their email address correctly in the email field.

Are You Ready to Start Using WordPress Forms with Conditional Logic?

WordPress forms with conditional logic are an essential part of the online business toolkit for better conversion rates and a positive user experience.

Tripetto’s form plugin offers a wide range of easy-to-use features, including a slick and intuitive interface that doesn’t need additional add-ons. Tripetto’s functionalities are straight out-of-the-box and plentiful.

So, what are you waiting for? Try Tripetto today to see for yourself how simple it is to use. The 100% 14-day money-back guarantee makes this an easy decision!

Share this article