How can I auto-populate answers from a previous question?

Cathy395 IrelandCommunity Member Qubie ✭
edited July 8 in Custom Code

I'm creating a form for people to fill in when they are looking to get a product serviced. As a customer could have multiple products for servicing, the same questions need to be asked multiple times. However, we require that the customer input all of the product information for each product they would like serviced even if the only difference between products is their serial number. We are therefore looking to auto-populate some answers for customers if they have multiple products with the same information.

The initial question that we would like the information to populate from is a form field question with 6 different options. I have Javascript included in this question so that some answers are text entry and some dropdown.

I am not well versed in JavaScript so I am unsure as to how to go about auto-populating these answers. Would anyone have any ideas?


  • bstrahin
    bstrahin Madison, WICommunity Member - Trial User Wizard ✭✭✭✭✭

    @Cathy395 have you looked at the documentation for adding default choices? Using the piped text options may suit your needs.

  • Cathy395
    Cathy395 IrelandCommunity Member Qubie ✭

    @bstrahin thank you so much for your response! I have had a look into adding default choices but unfortunately I don't know that it will work for me. For example, if a customer has 3 products for servicing. Products 1 and 2 have different information but product 3 has the same information as one of the previous products. Is there a way to pipe the answer choices from both products 1 and 2?

  • Cathy395
    Cathy395 IrelandCommunity Member Qubie ✭

    @bstrahin I think I have finally figured it out! I set up embedded data which I then piped down into the new question. Then used some JS to display the answers in a dropdown. One thing I'm wondering is if there is a way for me to deduplicate responses?