Gravity forms conditional logic

New Page

Tutorials –

Quick guide to using conditional logic for smarter forms

Posted on July 9, 2018

conditional logical form

The sad truth about online forms is that many of them are long, complex, and overwhelming.

Sometimes users want to fill out a form, but don’t have the drive to figure it out and answer all the questions. This is a challenge for marketers who need their customers to submit certain data points, but don’t want to sacrifice conversions.

Why are people so ruthless when it comes to shapes?

Because in the digital age, people expect personalization. They don’t want to answer questions that don’t apply to them or their circumstances. They prefer to spend their time and money with brands that connect with them on a personal and human level.

According to Marketing Insider Group, 78% of internet users say personally relevant content from brands increases their purchase intent. Marketing campaigns are 83% less effective when the experience is irrelevant to the user.

So if you use forms as part of your marketing campaigns or sales funnels, it’s smart to make them short and personalized to the user.

Fortunately, there’s a simple way to create advanced forms that aren’t arduous or overly complex.

With conditional logic (a Gravity Forms feature), you can build interactive forms that let you collect the data you need without straining the user experience.

Not sure when to use conditional logic in your forms? Download this free guide to learn more.

Click Here

What is Conditional Logic?

Here’s the simple answer: Conditional logic allows you to automatically make decisions based on a condition or action that occurred.

Conditionals are mechanisms that allow for additional instructions based on a particular response. They’re your typical “if this, then that” process.

conditional logical form

Image: nyu.edu

Conditional logic in regards to forms is a way to create forms that change based on input. You can configure fields to display or hide based on a user’s response to other fields. This allows you to tailor your forms to your users’ specific needs.

That may seem technical, but it’s really quite easy. Let’s use an example:

An event venue has an online form for prospective customers. One field asks for the type of event. If the user selects “Wedding” from a drop-down list, a few extra questions appear (in the same form) that relate to weddings, like “Do you have a caterer?” or “Who will supply the cake?” If the user selects another type of event, a different group of questions appears.

While you could show all your fields to everyone who views the form, no one wants to read through questions about weddings if they’re planning a graduation party.

Conditional logic shortens your forms, which reduces your abandonment rate. This is especially important for mobile users who are even less forgiving with long, cumbersome forms.

Incorporating this type of logic into your forms creates a user-friendly experience for your web visitors. It allows them to complete forms in a fast, efficient manner, without feeling like the whole process is a chore.

Most importantly, conditional logic makes your users feel like the experience was customized specifically for them. According to Infosys, 74% of customers feel frustrated when web content isn’t personalized, and 59% say that personalization influences their shopping decisions.

Best Practices for Conditional Fields

Before you start adding conditional logic to your form fields, let’s go over some best practices. These will help you improve your form conversions and ultimately your bottom line.

1. Keep Your Forms Simple

Just because you can hide fields behind conditional logic doesn’t mean you should add unnecessary elements to your forms.

Generally speaking, shorter forms create a better user experience and increase the likelihood a user will complete it. In one case study, an 11-field form saw a 120% increase in completions when it was reduced to four fields.

conditional logical form

Image: unbounce.com

It’s still important to keep your forms as simple as possible so you don’t overwhelm your users. You don’t want your users to stare at your forms and think, “Why do they need this?”

That means…

  • Don’t ask for any information you don’t need.
  • Don’t ask for information you don’t need right away.
  • Don’t ask for anything you could easily learn on your own.
  • Avoid asking for anything your users don’t know off the top of their head.

That said, there are some exceptions. Removing fields doesn’t always increase conversions. It’s always important to A/B test your forms to discover what works best for your audience.

2. Indicate the Fields’ Requirements

Don’t assume your users will know a form is required just because it pops up. They may see the new field, but ignore it because they don’t think it’s necessary. Besides, a form error message puts a cramp in the whole user experience.

If a conditional field is required, mark it as such in your form editor so your users know what you expect and you get the information you need.

3. Relate Conditional Fields to Their Trigger Fields

This should go without saying, but we’ve seen it before so it’s worth mentioning.

The field that triggers a conditional field to appear or hide should clearly relate to that conditional field.

For instance, if users click a checkbox next to “Subscribe to the newsletter,” it would be smart to set conditional logic to display a field with options for different kinds of email content or sending times.

But if they agree to receive your newsletter, it wouldn’t make sense to display a field that asks for something seemingly irrelevant, like their dog’s name or their favorite hobby.

You may have perfectly good reasons for asking for this obscure information, but if your user doesn’t understand why you need it, there’s a good chance they won’t supply it.

Conditional Logic in Gravity Forms

With Gravity Forms, using conditional logic is straightforward and easy. You can create rules to display or hide a drop down, checkbox, single line of text, or multiple choice field.

In the form editor, create all the fields your form requires. For instance, you might create a drop down field for the question “Would you like ice cream?” with options for YES and NO, as well as a checkbox field with different flavors of ice cream.

To add conditional logic to a field, open that field in the form editor and select the “Advanced” tab. At the bottom, click the checkbox next to “Enable Conditional Logic.” More options will appear.

conditional logical form

Adjust the options to create a rule for the field. In the case of the ice cream example, you want the checkboxes of flavors to display only if the user answers YES to “Would you like ice cream?”

So you would create a rule like this:

Show this field if all of the following match: Would you like ice cream? is YES.

You can apply conditional logic to your fields even if you span the form across separate sections and pages.

If you’re still confused as to how to set up conditional logic with Gravity Forms, check out this great tutorial video by Kori Ashton.

Play around with the conditional logic rules to discover unique ways to customize your forms.

For more information, read our documentation guide.

Grab your free reference guide on when you should conditional logic in your forms.

Click Here

Final Thoughts

If building conditional logic into your forms seems difficult, don’t worry. You’ll get the hang of it in a few moments, even if you use a different forms provider.

Cela dit, ne créez pas de champs conditionnels si vos formulaires n’en ont pas besoin. Nous pensons que la technologie est cool aussi, mais il est préférable de laisser vos formulaires aussi simples que possible. Si un champ conditionnel n’a pas de sens dans votre formulaire, ne l’utilisez pas.

La logique conditionnelle est un moyen utile de créer des formulaires simples et personnalisés qui respectent l’expérience utilisateur. Si vous les utilisez intelligemment, vous créerez des formulaires à haute conversion que vos utilisateurs adorent.

 

Gravity Forms Bulletin Si vous voulez vous tenir au courant de ce qui se passe sur le blog, inscrivez-vous à la newsletter Gravity Forms !

  • E-mail*

    Ingrese correo electrónico Confirmer l’e-mail

  • Intimité*
    • I agree with the storage and processing of my data by this site. – Privacy Policy *
  • CAPTCHA

D

Tutorials –

Quick guide to using conditional logic for smarter forms

By Posted on July 9, 2018

conditional logical form

The sad truth about online forms is that many of them are long, complex, and overwhelming.

Sometimes users want to complete a form, but they don’t have the drive to figure it out and push through all the questions. This is challenging for marketers who need their customers to submit certain data points, but don’t want to sacrifice conversions.

Why are people so unforgiving when it comes to forms?

Because in the digital age, people expect personalization. They don’t want to answer questions that don’t apply to them or their circumstances. They’d rather spend their time and money with brands who connect with them on personal, human levels.

According to Marketing Insider Group, 78% of internet users say personally relevant content from brands increases their purchase intent. Marketing campaigns are 83% less effective when the experience is irrelevant to the user.

So if you use forms as part of your marketing campaigns or sales funnels, it’s smart to make them short and personalized to the user.

Fortunately, there’s a simple way to create advanced forms that aren’t arduous or overly complex.

With conditional logic (a Gravity Forms feature), you can build interactive forms that let you collect the data you need without straining the user experience.

Not sure when to use conditional logic in your forms? Download this free guide to learn more.

Click Here

What is Conditional Logic?

Here’s the simple answer: Conditional logic allows you to automatically make decisions based on a condition or action that occurred.

Conditionals are mechanisms that allow for additional instructions based on a particular response. They’re your typical “if this, then that” process.

conditional logical form

Image: nyu.edu

Conditional logic in regards to forms is a way to create forms that change based on input. You can configure fields to display or hide based on a user’s response to other fields. This allows you to tailor your forms to your users’ specific needs.

That may seem technical, but it’s really quite easy. Let’s use an example:

An event venue has an online form for prospective customers. One field asks for the type of event. If the user selects “Wedding” from a drop-down list, a few extra questions appear (in the same form) that relate to weddings, like “Do you have a caterer?” or “Who will supply the cake?” If the user selects another type of event, a different group of questions appears.

While you could show all your fields to everyone who views the form, no one wants to read through questions about weddings if they’re planning a graduation party.

Conditional logic shortens your forms, which reduces your abandonment rate. This is especially important for mobile users who are even less forgiving with long, cumbersome forms.

Incorporating this type of logic into your forms creates a user-friendly experience for your web visitors. It allows them to complete forms in a fast, efficient manner, without feeling like the whole process is a chore.

Most importantly, conditional logic makes your users feel like the experience was customized specifically for them. According to Infosys, 74% of customers feel frustrated when web content isn’t personalized, and 59% say that personalization influences their shopping decisions.

Best Practices for Conditional Fields

Before you start adding conditional logic to your form fields, let’s go over some best practices. These will help you improve your form conversions and ultimately your bottom line.

1. Keep Your Forms Simple

Just because you can hide fields behind conditional logic doesn’t mean you should add unnecessary elements to your forms.

Generally speaking, shorter forms create a better user experience and increase the likelihood a user will complete it. In one case study, an 11-field form saw a 120% increase in completions when it was reduced to four fields.

conditional logical form

Image: unbounce.com

It’s still important to keep your forms as simple as possible so you don’t overwhelm your users. You don’t want your users to stare at your forms and think, “Why do they need this?”

That means…

  • Don’t ask for any information you don’t need.
  • Don’t ask for information you don’t need right away.
  • Don’t ask for anything you could easily learn on your own.
  • Avoid asking for anything your users don’t know off the top of their head.

That said, there are some exceptions. Removing fields doesn’t always increase conversions. It’s always important to A/B test your forms to discover what works best for your audience.

2. Indicate the Fields’ Requirements

Don’t assume your users will know a form is required just because it pops up. They may see the new field, but ignore it because they don’t think it’s necessary. Besides, a form error message puts a cramp in the whole user experience.

If a conditional field is required, mark it as such in your form editor so your users know what you expect and you get the information you need.

3. Relate Conditional Fields to Their Trigger Fields

This should go without saying, but we’ve seen it before so it’s worth mentioning.

The field that triggers a conditional field to appear or hide should clearly relate to that conditional field.

For instance, if users click a checkbox next to “Subscribe to the newsletter,” it would be smart to set conditional logic to display a field with options for different kinds of email content or sending times.

But if they agree to receive your newsletter, it wouldn’t make sense to display a field that asks for something seemingly irrelevant, like their dog’s name or their favorite hobby.

You may have perfectly good reasons for asking for this obscure information, but if your user doesn’t understand why you need it, there’s a good chance they won’t supply it.

Conditional Logic in Gravity Forms

With Gravity Forms, using conditional logic is straightforward and easy. You can create rules to display or hide a drop down, checkbox, single line of text, or multiple choice field.

In the form editor, create all the fields your form requires. For instance, you might create a drop down field for the question “Would you like ice cream?” with options for YES and NO, as well as a checkbox field with different flavors of ice cream.

To add conditional logic to a field, open that field in the form editor and select the “Advanced” tab. At the bottom, click the checkbox next to “Enable Conditional Logic.” More options will appear.

conditional logical form

Adjust the options to create a rule for the field. In the case of the ice cream example, you want the checkboxes of flavors to display only if the user answers YES to “Would you like ice cream?”

So you would create a rule like this:

Show this field if all of the following match: Would you like ice cream? is YES.

You can apply conditional logic to your fields even if you span the form across separate sections and pages.

If you’re still confused as to how to set up conditional logic with Gravity Forms, check out this great tutorial video by Kori Ashton.

Play around with the conditional logic rules to discover unique ways to customize your forms.

For more information, read our documentation guide.

Grab your free reference guide on when you should conditional logic in your forms.

Click Here

Final Thoughts

If building conditional logic into your forms seems difficult, don’t worry. You’ll get the hang of it in a few moments, even if you use a different forms provider.

That said, don’t create conditional fields if your forms don’t need them. We think the technology is cool too, but it’s best to leave your forms as simple as possible. If a conditional field doesn’t make sense in your form, don’t use it.

Conditional logic is a useful way to create simple and personalized forms that respect the user experience. If use them smartly, you’ll build high-converting forms your users love.

 

Gravity Forms Bulletin If you want to keep up-to-date with what’s happening on the blog sign up for the Gravity Forms newsletter!

  • Email*

    Ingrese correo electrónico Confirm Email

  • Privacy*
    • I agree with the storage and handling of my data by this website. – Privacy Policy *
  • CAPTCHA

Δ

Enabling Conditional Logic For A Field

  • Introducción
  • Ejemplo básico de lógica condicional
  • Ejemplo de lógica condicional usando secciones
  • Limitaciones
  • Actuación

Introduction

The Enable Conditional Logic option in the field settings allows you to create rules to dynamically display or hide the field based on values from another field. In order to use conditional logic, you will need to add a field to your form which supports conditional logic.

conditional-logic1-1024x464

After enabling conditional logic for a field, you will have the option to show or hide the field depending on whether all/any of the conditions you specify are met. You can specify additional conditions by clicking the plus icon to right of the conditions. Clicking the minus sign will remove the corresponding condition.

Basic Conditional Logic Example

conditional logique account id

In this example, we will use conditional logic to show different products based on a parent category. A dropdown field will determine what products may be purchased based on the current selection.

conditional-logic-auto1

  1. Primero, configure sus campos. Como usaremos un menú desplegable para manejar la visualización de varios productos, comience creando un solo menú desplegable , algunos campos de productos y un campo total para mostrar el total del pedido. En este ejemplo, hemos creado 3 opciones diferentes dentro del menú desplegable para Jeep, Ford y Honda, así como campos de productos como Wrangler, Cherokee y Mustang.

logic-conditional-auto2-1024x423

  1. Como queremos que los modelos Jeep aparezcan cuando se seleccione Jeep, los modelos Ford cuando se seleccione Ford y los modelos Honda cuando se seleccione Honda, necesitaremos habilitar la lógica condicional en cada uno de estos productos. Abra las opciones de uno de sus productos haciendo clic en el campo y haga clic en la sección Lógica condicional .

logic-conditional-auto3

  1. Dentro del menú desplegable, debería ver una palanca etiquetada Habilitar lógica condicional . Cuando se activa, se mostrarán las opciones para mostrar u ocultar condicionalmente este campo.

conditional-logic-auto4-1024x418

  1. En cada uno de sus productos, simplemente habilite la lógica condicional y use los menús desplegables para mostrar solo cuando su menú desplegable sea igual a la selección deseada. Por ejemplo, para nuestro producto Wrangler , lo configuramos para que solo se muestre si el campo Opción es igual a Jeep.

Eso es todo lo que hay que hacer para crear una lógica condicional básica dentro de los productos. Ahora debería poder mostrar u ocultar campos de forma condicional en función de otros campos en su formulario.

Ejemplo de lógica condicional usando secciones

En este ejemplo, usaremos lógica condicional para mostrar diferentes secciones de un formulario según la entrada del usuario. Un campo de botón de radio determinará qué sección del formulario se muestra en función de la selección actual.

Show section breaks with conditional logic

  1. Como usaremos un campo de botón de radio para manejar la visualización de las secciones, comience creando un solo campo de botón de radio . En este ejemplo, hemos creado 3 opciones diferentes dentro del botón de opción para Gato, Perro y Pez.

conditional-logic-animals1-1

  1. A continuación, deberá crear las diferentes secciones del formulario utilizando el campo Sección. Cree las 3 secciones de Gato, Perro y Pez con los campos necesarios debajo de cada salto de sección. En este caso, utilizamos campos de Texto, Número y Párrafo de una sola línea.

conditional-logic-pets2a-1024x380

  1. Como queremos que la sección Gato aparezca cuando se seleccione Gato, la sección Perro cuando se seleccione Perro y la sección Pez cuando se seleccione Pez, necesitaremos habilitar la lógica condicional en cada una de estas secciones. Abra las opciones en una de sus secciones haciendo clic en el campo y haga clic en la sección Lógica condicional .

logic-conditional-animals3-1024x435

  1. Dentro del menú desplegable, debería ver una palanca etiquetada Habilitar lógica condicional . Si hace clic en el interruptor, se mostrarán las opciones para mostrar u ocultar condicionalmente este campo.

conditional-logic-pets4-1024x432

  1. In each of your sections, simply enable conditional logic and use dropdowns to display only when your dropdown equals your desired selection. For example, for our Cat section, we set them to only display if the radio button field equals Cat.

conditional-logic-animals5-1024x430

Limitations

  • As mentioned earlier in the introduction, conditional logic rules must be based on values ​​from another field, setting conditional logic to show or hide a field based on its own values ​​is not supported .
  • Fields hidden by conditional logic are ignored when submitting the form , this is one of the main reasons for using conditional logic and cannot be changed . This means that the hidden fields will not be available for any processing done after the form submission (eg Calculations) and will not be saved on input.

  • Certain special characters, such as pipe (|) greater than and less than ( < > ) or HTML tags in field values, can prevent conditional logic rules from working as expected. To avoid this issue when using a field with predefined options, such as a dropdown or radio button field, we recommend enabling the “show values” setting in the field and making sure to use only plain text in the Value for Options column . without any special characters or HTML tags.
  • Lógica conditional anidada. See the next page of the documentation for more details.

  • When working with decimals, you should use a leading 0 if necessary . Example : 0.2 is valid, .2 is not valid.
  • Like Gravity Forms , rounding is limited to four decimal places ; this same limitation applies to values ​​entered in conditional logic rules. Example : 0.0002 is valid, 0.00002 is not valid.

actuation

L’évaluation de la logique conditional is done on the client side (the browser) using JavaScript, and unfortunately, browsers are not very fast at performing these tasks. The browser has to process all the fields to evaluate the conditional logic and know which fields to show/hide, along with any other JS scripts you might have in the page. Also, some use cases of conditional logic can add additional work to the browser, for example if you are using conditional logic to show/hide a field and also use this same field as a value in another field, conditional logic that would make the browser be Constantly checking rules of both fields, creating a loop and increasing the browser’s CPU resource usage.

This means that if you have a huge form with many fields, you may experience slow display or usage of the form , this is expected due to the above. The only solution to improve conditional logic performance in this case would be to reduce the number of fields or split the form into many smaller forms.

Dans le didacticiel suivant, you can see how to pass data from one form to another if you need to: Using confirmation query strings to complete a form based on another submission. Also, a third-party plugin that could help simplify the process: Easy Passthrough.

  • Did you find this article useful
  • How can we improve it?
  • support de contact
  • Name

    This field is for validation purposes and should be left unchanged.

D

Last modification: May 18, 2022

Google Google translator

Google Google Translate


Video Gravity forms conditional logic

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…