Anvil Logo
Products
Industries
Resources
Developers
Webform editor

Add logic to a Webform field

You can create a more streamlined and guided experience for someone filling out your Webforms by adding field logic. Webform field logic determines whether or not a field is shown or hidden based on information provided earlier in the Webform or Workflow. This is especially helpful if you’re trying to curate questions relevant to individual customers.

Like page logic, Anvil’s Webform field logic allows you to build logical expressions using standard operators like:

  • = Equals
  • ≠ Not Equal to
  • > Greater than
  • ≥ Greater than or equal
  • < Less than
  • ≤ Less than or equal
  • Filled (exists)
  • Not filled (does not exist)
You can add multiple conditions and choose whether or not they should be connected with AND or OR.

Our standard logic determines the visibility of a Webform field. If you'd like to apply complex logic, you'll need to use our advanced JSON editor.

Back to Help Center

You can control the visibility of individual Webform fields by adding conditional logic.

In this article, we’ll show you how to add, edit and remove conditional logic from a Webform field.

Add conditional logic to a Webform field

You can control whether or not an individual Webform field is visible by adding conditional logic. You can add multiple conditions if you’d like and these conditions can be added as AND or OR expressions.

To add conditional logic to a Webform field:

  1. Navigate to the Workflow editor
  2. Select the Webform field you want to hide
  3. Click the Field logic tab in the Webform editor panel to the left
  4. Select Add condition
  5. Click Form Field > choose the Webform field you want to base the logic on from the dropdown menu
  6. Add a Condition using the dropdown menu
  7. Save

Repeat steps 4-7 to add more conditions to the page’s visibility logic.

Notes:

  • You can only base your field logic on fields that appear in the Webform or Workflow before your current field.
  • Available conditions depend on the field type you’re basing your field logic on.

Edit or remove a Webform field’s conditional logic

Has the logic for your Webform field changed? Updating or removing field logic is easy! Keep your Webform fields up to date by editing or removing some or all of your visibility conditions.

To edit or remove a Webform field’s conditional logic:

  1. Navigate to the Workflow editor
  2. Select the Webform field you wish to edit
  3. Click the Field logic tab in the Webform editor panel to the left
  4. Select the three vertical dots next to the condition you want to edit or remove
  5. Choose your desired action from the dropdown menu The edit option is first, followed by the delete option
    • Edit > Make your desired changes > Save
    • x Delete Condition > OK

Repeat steps 4-5 to edit or remove more field logic conditions.

Back to Help Center

Other common posts

1 - 0 of 0

Contact support

We know dealing with tech support can be painful. It's our goal to help you as quickly and efficiently as possible. Once we get your message, we will email you back as soon as we can.
    Ready to experience document workflow automation?Sign up for free