Conditional Logic: Showing and Hiding Questions

In this tutorial, we'll show you how you can add conditional logic to the forms you design and build in Figma. More specifically, we'll show you how to show and hide elements based on form responses.

Do you want to hide or show specific elements in your form pages depending on what a respondent answers? In this tutorial we'll show you how to do just that using conditional logic in the weavely Figma plugin.

Would you rather have a weavely team member explain this to you in a video? Check out this video tutorial:

Example Design in Figma

The image below shows the example form we'll be using for this tutorial. Our form comprises a single page, with two questions. The "Why not?" question should only be visible if the respondent answers "No" to the first question (i.e. "Do you like music?").

Using Conditional Logic to Show/Hide Questions

Weavely allows you to create Logic rules in the plugin. These rules enable you to specify conditional logic using traditional "IF-Then" structures.

To create a rule, open the "Logic" menu in the plugin and press the "+ Add Rule" button at the top right of the screen.

In our example we want to express that IF the user answers "No" to the first question (which we labelled"Music") THEN we want to show the second question (which we labelled "Reason"). The gif below shows exactly the steps needed to create this rule.

The result in a browser is shown in the gif below. As expected the "Why not?" question is only shown when the user selects "No" for the first question.