How to Show or Hide Fields Based on User’s Answer

  • kierstalsph
    Asked on May 26, 2023 at 7:22 AM

    Say I could select options 1 and 2 (or multiple combinations) and the corresponding sections would show up while the other sections unselected will remain hidden

  • Chris_L JotForm Support
    Replied on May 26, 2023 at 8:38 AM

    Hi Urika,

    Thanks for reaching out to Jotform Support. I understand you wanted to show/hide form fields based on the user's answer, this is definitely possible. Let me show you how to set it up:

    1. On your My Forms page, hover your mouse over your form and click on Edit Form.
    2. In Form Builder, click on the Add Form Element menu and drag-drop the fields you want to use as follow-up questions (Short Text fields are used in this example).
    3. Click on the Type a Question text and change it to the question you want to use.

    1648542176 6242c1e0500a4 followup questi Screenshot 10

    Now, let's set up the conditions:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
    2. Click on Conditions on the left of the page.
    3. Now, click on Add a New Condition and then click on Show/Hide Field.
    4. Set the conditions like you see below:
    • IF: Do you have a dog or a cat? (this is the question that has the choice that the form submitter needs to select)
    • STATE: Is Equal To
    • VALUE: Dog (the first choice)
    • DO: Show
    • FIELD: What is the name of your dog? (the follow-up question that you want to show)

    1648542257 6242c23146edb followup questi Screenshot 21

    Set up Conditions for all of the choices for your question. Check out the screencast below to see how your form will work after setting up the Conditions:

    1648543079 6242c567de0c6 followup questi Screenshot 32

    You may also check out this guide.

    Give it a try and let us know how it goes.

  • jalvergaze
    Replied on May 27, 2023 at 4:18 PM

    To show or hide fields based on a user's answer, you can utilize conditional logic in your form or application. Conditional logic allows you to control the visibility of certain fields or sections depending on the user's input or selection. This functionality enhances user experience by presenting them with a dynamic and personalized form.

    Here's an example scenario to illustrate how conditional logic can be used:

    Let's say you are creating a survey form to gather feedback on a product, and one of the questions asks whether the user has previously purchased the product. Based on their response (yes or no), you want to show or hide additional fields for further details.

    1. Begin by designing your form or survey with the initial question and the additional fields you want to show or hide based on the user's response.
    2. Set up the conditional logic for the subsequent fields. Most form builders or development frameworks provide a user-friendly interface to define conditional rules. In this case, you would set a rule that says:
    • If the user selects "Yes" to the question "Have you previously purchased the product?"
    • Show the additional fields for further details.
    • If the user selects "No" to the same question:
    • Hide the additional fields, as they are not relevant.
    1. Save the conditional logic settings, and ensure that the form or survey is configured to handle the visibility changes correctly.
    2. Test the form or survey to ensure that the fields are shown or hidden appropriately based on the user's answer. Verify that the form behaves as intended for both positive and negative responses.

    By applying conditional logic in this manner, you can tailor the form or application to the specific needs or preferences of the user. It simplifies the user interface, reduces clutter, and creates a more personalized experience.

    Now, let's incorporate the example of the Slideshare Downloader into a longer answer:

    Slideshare Downloader is a valuable online tool that enables users to download presentations from the popular content-sharing platform, Slideshare. Slideshare serves as a platform for users to upload and share presentations, documents, and infographics. While Slideshare offers a wide array of informative and visually appealing content, it lacks a built-in download feature, making it challenging for users to save presentations for offline use.

    To address this limitation, tools like Slideshare Downloader have emerged. Slideshare Downloader simplifies the process of downloading presentations from Slideshare by providing a user-friendly interface and a seamless experience.

    To utilize Slideshare Downloader effectively, follow these steps:

    1. Start by visiting the Slideshare Downloader website. The tool should be accessible from your preferred web browser.
    2. Locate the presentation you wish to download from Slideshare. On Slideshare, presentations are typically available through unique URLs.
    3. Copy the URL of the presentation you want to download. You can typically find the URL in the address bar of your web browser or through the "Share" or "Embed" options provided by Slideshare.
    4. Return to the Slideshare Downloader website and paste the copied URL into the designated box or field.
    5. Once you have pasted the URL, review the available options or settings provided by the Slideshare Downloader tool. These options may include selecting the desired format for the downloaded presentation, such as PDF or PowerPoint.
    6. After selecting the desired format, click on the "Download" or "Convert" button to initiate the downloading process.
    7. The Slideshare Downloader tool will process your request and generate a downloadable file containing the entire presentation. Depending on your settings, the downloaded file is typically in PDF or PowerPoint format.
    8. Save the downloaded file to your device, ensuring that you choose a location where you can easily locate and access the presentation in the future.