logo
Forms
May 26

Build dynamic Plumsail Forms with no-code conditional logic

Customer Support Engineer

In Plumsail Forms, you can create interactive forms with no code by adding rules to fields, controls, and containers. You can hide or disable elements by checking if a field is empty, or by comparing two field values against each other or against a static value.

This no code logic is a great addition to JavaScript capabilities of Plumsail Forms and is available for internal and external SharePoint forms, Airtable forms, and public web forms.

In this post, we will go through what Plumsail Forms conditional logic is capable of and share practical examples of how to make your forms smarter.

 

See the video overview of no-code conditional logic in Plumsail Forms:

 

Build no-code conditional forms

To set up conditional logic for a form element, select the element you want to hide or disable, and configure the rule for the corresponding action under the Rules section:

Rules section

 

Click the gear icon to configure the rule. In the Field drop down, you'll see a list of all fields and controls on the form available for building your logic. If you're working with an impressively long form, use the search bar to quickly find the exact one you need.

Field list

 

Next, select an operator. Alongside the standard equals to / not equals to and is empty / is not empty, there are dedicated operators for numeric and date. You can also use the Valid / Not valid operator to trigger a validation check for specific fields or controls.

Operators

 

On the right side of the menu, choose whether to compare to a static value or to another field:

Compare with

 

You can list multiple rules and define whether ALL or ANY of the conditions must be met to apply the rule:

Any or All

 

Now that we've covered the basics, let's look at a few practical ways to use these rules to make your forms more dynamic.

Add condition with static value

The most basic example, that creates a branching logic form, is to show an element only if users selects a specific option from the dropdown.

For instance, to show the Custom Reason field only if the user selects Other in the dropdown with predefined options:

Rule to check selected value

Rule to check selected value

Show Custom Reason

The Reason field shows only when 'Other' is selected

You can also show or hide an entire container at once, not a single field. Say you want the More details section to appear when the expense amount exceeds $100:

Rule to check Amount value

Rule to check Amount value

Show more details

The More details section shows only when the expense amount exceeds $100

Add rule comparing two fields

Taking it a step further, you can set up rules that compare one field against another. This works as a validation safeguard.

For instance, you can compare two date fields and show a warning message — HTML control with a custom message — when the end date is earlier than the start date:

Rule to validate two date fields

Rule to compare two date fields

Show date validation message

Warning message appears when end date is earlier than start date

A similar approach prevents typos in essential fields. You can disable the submit button until the value in the Confirm phone field matches the Phone field exactly:

Rule to validate phone

Rule to validate phone number

Disable submit button

Submit button is disabled until phone numbers match

Add rule checking if value is empty

Another good way to improve form logic and data validity is to check if the field is empty or not.

For instance, you can show the Comment field asking to provide some explanation only when a user uploaded a file in the attachment control:

Rule to check attachment

Rule to check attachment

Show Comment when attachment is not empty

Comment field shows only when an attachment is uploaded

Or disable submit button until the user agrees to the terms and conditions by ticking the checkbox:

Rule to check checkbox

Rule to check checkbox

Disable submit button until checkbox is ticked

Submit button is disabled until checkbox is ticked

Combine multiple rules for advanced logic

You can stack as many rules as you need, crating logic that fits your business and simplifies the user experience.

Take a complex expense form. Let's say you want to show the Comments field only if the travel expenses exceed $500 and expense type is Local travel. Here is the condition you need:

Using ANY operator

Rule using ANY operator

You also want to show the Itemized Expenses table when the amount exceed $1000 or the expense type is Client Entertainment:

Using ALL operator

Rule using ALL operator

And here's the dynamic, no-code form with all the rules in action:

multiple-rules-form

Form with multiple rules in action

Try it yourself:  

When you still want JavaScript

The visual rules cover most validation patterns. Reach for JavaScript when you need:

  • Complex cross-field calculations
  • Calling external APIs
  • Triggering custom actions and validations
  • Changing form logic based on user roles or specific user names
  • Limitless custom UI/UX adjustments

If your form logic needs to go beyond visual rules, you don't have to be a developer to write the necessary JavaScript. You can use the built-in AI chat, or your favourite AI tool to draft the code, browse Plumsail documentation for ready-made snippets — there are plenty!

Create your own dynamic form with no code rules

Plumsail Forms no-code conditional logic is designed to simplify the form creation process and make your layouts more dynamic. And we hope these examples spark some ideas for your own processes to be transformed with dynamic forms.

Build your first form today with a free trial — from scratch, or start from a ready-made template.

Hit a wall on a tricky scenario? Schedule a demo, ask on the Plumsail Community, or contact the support team — we love to rack our brains for you.