1. Home
  2. WP User Frontend Pro
  3. Tutorials
  4. How to use conditional logic

How to use conditional logic

Conditional Logic

We are here with “WP User Frontend Pro” Tutorials. Today we learn the easy way to create a form by using “Conditional Logic”.

What is Conditional Logic

Conditional logic allows you to configure your form to show or hide fields, sections, pages based on user selections. This allows you to easily control what information your user is asked to provide on your WordPress powered site and tailor the form specifically to their needs.

How to use:

Conditional logic is very easy to use. Now I am  showing  you how to create a form by using conditional logic. OK let’s start.

  • Just  go to admin area User Frontend>Forms >Add Form.
Screenshot_3
How to add form
  • Add form title and radio field for conditional logic.
  1. Form title: Enter here your form title.
  2. Radio field: click to the  Radio Field button from the Custom Fields.
  3. Field Label: Enter here your field label as I wrote in this photo below.
  4. Meta Key: write here your meta key.
  5. Label: write here your label.
  6. Plus: click this button to add more label.
Add radio field to the form
Add radio field to the form
  • Add e-mail fields and add a condition.
  1. E-mail: Click e-mail from custom fields.
  2. Field Label:  Enter here your field label as I wrote in this photo below.
  3. Meta Key: Write here your meta key.
  4. Conditional Logic: Click yes to enable conditional logic.
  5. Logic field: Select a desired label to apply conditional logic as I select “Member Type”.
  6. Condition field: Select a desired condition as I select “Regular Member”.
Adding email field and applying conditional logic
Adding e-mail field and enabling condition
  • Now as previous fields just add another desired fields and apply conditional logic. Here are some fields and condition  which I have used after previous fields.
  1. Section Break: Select section break field, write the title as “Please register for being a member, click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  2. Text field: Select text field from custom fields, field label as “Name” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  3. Text field: Select text field from custom fields, field label as like  “E-mail” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  4. Text field: Select text field from custom fields, field label as like  “Phone number” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  5. Text field: Select text field from custom fields, field label as like “Present address” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  6. Text field: Select text field from custom fields, field label as  like “Permanent address” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
  7. Country List Field: Select country list field from custom fields, field label as like “Country” and click yes to enable conditional logic, select conditional label as member type and option as a non-member.
Used fields
Fields I have used
  • After doing all this things you have to click Publish button and finally, Create another page and use this form Short-code. Now your users can see this conditional logic form on your site and manage them from their Dashboard.That’s all for today.  I will come with more tutorials.
Regular member form
Regular member form
Form for non-member
Form for non-member

If you have any question or require support post your topic in our support forum here.

Was this article helpful to you? Yes 1 No 1

How can we help?