Pre-filling fields based on calculations of other questions

  • UHT_Production
    Asked on May 8, 2024 at 2:40 AM

    Hi there,

    I'd like to pre-populate a field based on the responses to two other questions.

    Question 1: a dropdown with five possible answers, each can be coded with a Letter (A-E)
    Question 2: a dropdown with five possible answers, each can be coded with a number (1-5)

    The pre-fill needs to be able to combine the responses from Question 1 and 2 generate a response, eg "A3 High" or "D3 Medium", with 25 possible answers.

    How can I do this?



  • Sheena JotForm Support
    Replied on May 8, 2024 at 3:01 AM

    Hello UHT_Production,

    Thanks for reaching out to Jotftom Support. I'm not sure if I understand your concern correctly. Are you trying to assign a letter or number to each option? Could you give an example of how you'd like this to work in your form and what specific answers you want to see?

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • UHT_Production
    Replied on May 10, 2024 at 2:38 AM

    Hi Sheena,

    I'm trying to recreate this Risk Rating Matrix in a question form:

    Pre filling fields based on calculations of other questions Image 1 Screenshot 20

    Asking survey respondents to answer two questions for the likelihood and the consequence. Question 1 "what is the likelihood?"
    Question 2 "what is the consequence?"
    Which then generates a rating low/medium/high/extreme.

    So, for example if a person says:

    Question 1 - Possible (C)
    Question 2 - Minor (2)

    I'd like a section to prefil with "C2 - Medium"

    Is that clear?

  • Mary_Ed JotForm Support
    Replied on May 10, 2024 at 3:03 AM

    Hello UHT_Production,

    Thanks for getting back to us and we’re sorry you’re having trouble with this. To achieve your request, we can use a Form Calculation Widget to combine the answers to Questions 1 and 2. Let me show you how it's done:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.
    2. Under the Basic tab, scroll down the list, choose the Single Choice element, and enter your Question 1 and 2 selections in it.

      Pre filling fields based on calculations of other questions Image 1 Screenshot 40

    3. Under the Widgets tab, search for the Form Calculation Widget and add the two questions fields in it:

      Pre filling fields based on calculations of other questions Image 2 Screenshot 51
    4. If you want to display only the letters and numbers, edit the selection of your Single Choice elements. Pre filling fields based on calculations of other questions Image 3 Screenshot 62

    We also have a guide about How to Perform Form Calculation Using a Widget that you can check out.

    Give it a try and reach out again if you have any other questions.

 
Your Answer