How to Populate Fields Based on the User's Answer?

  • cbmpcrestedbutte
    Asked on July 7, 2024 at 1:31 PM

    Hi,

    Is it possible to add additional information to a form based on a user's selection?

    I'm trying to save time for the Real Estate Agents. They dislike filling out forms because they have to look up information we should already have. For example, if they indicate they are in the Chico Office, they should not need to fill in the address.

    We need this information on the form because it goes to outside Admin, who will need the address.

    Can we map the fields so that when an agent selects "C21 Chico," the form will populate the address?


    How to Populate Fields Based on the Users Answer? Image 1 Screenshot 20


  • Marehlene_B JotForm Support
    Replied on July 7, 2024 at 2:07 PM

    Hi cbmpcrestedbutte,

    Thanks for reaching out to Jotform Support. A workaround is to add multiple short texts with duplicated fields, with the other short texts hidden with a default value including the address, and then set up a Copy condition to copy the value of those short texts to the short texts that appear in the form when the C21 Chico is selected. Let me show you how:

    1. In Form Builder, select Add Form Element in the upper-left corner.
    2. Add 4 Short Texts and Shrink and Hide them. 
    3. Select your element's gear icon to open its properties.
    4. Go to Advanced tab and enter the Default Value.

    How to Populate Fields Based on the Users Answer? Image 1 Screenshot 70
    We will now add Short Text Fields to copy those values and map those four new short texts to the PDF. Add an additional four texts and map them into the PDF.

    How to Populate Fields Based on the Users Answer? Image 2 Screenshot 81
    We'll now create a condition so that if the C21 Chico is selected, the default values are passed into the visible short texts. 

    1. In Form Builder, go to Settings at the top.
    2. Select Conditions on the left.
    3. Add a new Update/Calculate Field condition.

    How to Populate Fields Based on the Users Answer? Image 3 Screenshot 92
    The conditional logic goes as follows: 

    How to Populate Fields Based on the Users Answer? Image 4 Screenshot 103
    How to Populate Fields Based on the Users Answer? Image 5 Screenshot 114Check out the screencast below to see my results:

    How to Populate Fields Based on the Users Answer? Image 6 Screenshot 125 I used short texts because the address field does not allow you to set a default value.

    Give it a try and let us know if you have any other questions.

  • cbmpcrestedbutte
    Replied on July 8, 2024 at 12:29 AM

    This is awesome. Thank you so much!!

Your Answer