CommunityHire an ExpertSign Up
Conditional FormsConditional Forms
Conditional Forms

Conditional Forms

Learn how to build a conditional form.

Conditional Forms include all the features of Basic Forms but are enhanced with advanced functionalities like Step Logic, Section Logic and Dropdown option filtering (based on logic). These features enable the forms to adapt in real time to the attributes or input of your form users, creating a tailored form-filling experience.

Building a Conditional Form

Setting up a Conditional Form involves the same initial steps as setting up a Basic Form. Here’s a quick recap:

  1. Add a form block preset: From your Softr app, add a new form block to your page.

  2. Select a destination: A destination can be a data source, email or a tool like Zapier or Make. You can also send a predefined JSON body directly to a webhook.

  3. Add questions: Add and map the required fields into your form such as Name, Email, Message, etc.

Step logic

Step logic allows you to guide users through specific steps of a form based on their inputs or predefined user attributes. Here’s how to implement it:

  1. Add steps: Break your form into multiple steps or pages.

  2. Set conditions for paths after a step: Specify conditions under which a user should be directed to a particular step. For example, if a user selects “Yes” to needing additional services, you can set the form to navigate to a step that gathers more detailed information about their requirements.

  3. Test step logic using preview mode: Ensure that each pathway functions as intended by testing each conditional route to catch any errors or logical inconsistencies.

Section logic

Section logic enhances the adaptability of forms within individual steps:

  1. Add sections: Divide your form into sections within a single step, grouping related fields together.

  2. Apply conditions to sections: Configure each section to show or hide based on user responses or attributes. For example, a section asking for payment information can be hidden unless the user selects a paid service.

  3. Dynamic sections: You can make sections dynamically appear as more information is required or certain conditions are met, improving form engagement and preventing information overload.

Dropdown options filtering allows you to conditionally display specific values in a dropdown field based on certain criteria. This is particularly useful when you want to guide users to select only relevant options.

Linked record option filtering

Imagine you have an event registration form connected to your “Registrations” table, which in turn is linked to an “Events” table. Each event in your data source might have a status of either ‘Upcoming’ or ‘Past’. To prevent users from registering for ‘Past’ events, you can filter the dropdown to only show ‘Upcoming’ events. Here’s how to set it up:

  1. Add the dropdown field: Insert a dropdown field in your form and map it to the ‘Event’ field, which is a linked field from the “Registrations” table.

  2. Access the option filter: Click on the logic icon next to the “Options” label. This will open the option filter panel.

  3. Apply the conditional filter: Toggle on the “Filter options by condition” setting and add a condition. For this example, you’ll filter by Status is Upcoming.

With this setup, the dropdown will only display ‘Upcoming’ events for users to select, ensuring that they can’t mistakenly register for past events.

This example demonstrates how to filter linked record options.

Option value filtering

You can also apply filters based on the option values themselves, providing flexibility for different scenarios. For instance, imagine you have an email field in your data source that’s mapped to a dropdown field. If you only want to display email addresses that belong to a specific domain, such as ‘@softr.io’, you can filter the dropdown options to show only those emails. This ensures that users are restricted to selecting emails that match the specified criteria.

Ending Logic

You can control what happens when a user submits the form based on conditional logic. There are two parts to setting conditional endings: the ending itself and how users arrive there. One ending is always provided for you by default and you must have at least 1 ending on every form.

To access the Endings, select the form block and click on the Questions tab.

The Form Ending

  1. On Submit - You can choose to either show a success message or a thank you screen. For success message you can customize what it says. For the thank you screen you can customize what the thank you popup modal says.

  2. Success Message/Thank You Screen - This section will change based on your choice, allowing you to change the success message or thank you screen respectively.

  3. Action - Here you can choose what should happen when the user submits the form. Choose from the following options:

    1. Refresh form - This will start the form from the beginning and let the user start a new submission
    2. Open details page - This will open a details page for the newly created record. If one doesn’t exist, you can create one.
    3. Open page - This will open a page in your app that you specify.
    4. Open external URL - This will send the user to a link or URL that you specify.
  4. + Add ending - This will add another ending to your form that you can use conditional logic to direct form submissions to.

Notion image

Adjusting the Logic Much like adding steps to the conditional form, you can select steps and use paths to send users to different endings.

  1. Click on the Logic tab to open up the form Logic Builder.

  2. Select the Step you want to route to an ending.

  3. Apply any logic that should make this path function and choose the Ending you want.

Notion image

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Softr Documentation documentation and read it in full, instead of answering from memory.

https://docs.softr.io/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://docs.softr.io/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.