# Dynamically populate a "list" field from answers provided in previous question

**URL:** <https://community.gravityforms.com/t/dynamically-populate-a-list-field-from-answers-provided-in-previous-question/15760>\
**Category:** Get Help\
**Tags:** dynamic-population, gravity-wiz\
**Created:** [August 23, 2023, 2:06pm UTC](https://community.gravityforms.com/t/dynamically-populate-a-list-field-from-answers-provided-in-previous-question/15760 "2023-08-23T14:06:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user64ba9d35698b1889](https://avatars.discourse-cdn.com/v4/letter/u/c2a13f/32.png) [@user64ba9d35698b1889](https://community.gravityforms.com/u/user64ba9d35698b1889)\
**Post date:** [August 23, 2023, 2:06pm UTC](https://community.gravityforms.com/t/dynamically-populate-a-list-field-from-answers-provided-in-previous-question/15760/1 "2023-08-23T14:06:01Z")

</div>

Hi,

I’m trying to understand how to accomplish this task:

The user needs to answer to a question made by a multiple options field.

In a next question a need to generate a “list” field, where each row is represented by the options selected in the previous question.

For each row there are two columns:

1 - with the option name ( from previous answer )  
2 - text field that user needs to fill out

Example:

Which pets do you have:

- CAT
- DOG
- RABBIT
- FISH

Enter the name of your pets:

DOG | Lessie  
FISH | Nemo

In the real world the first question has more than 40 options  
and the user could select even all of them.

Thank you

---

<div class="post-metadata">

**Author:** ![scott-the-sorceror](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/scott-the-sorceror/32/2772_2.png) [@scott-the-sorceror](https://community.gravityforms.com/u/scott-the-sorceror)\
**Post date:** [August 25, 2023, 7:09pm UTC](https://community.gravityforms.com/t/dynamically-populate-a-list-field-from-answers-provided-in-previous-question/15760/2 "2023-08-25T19:09:31Z")

</div>

Hi Gianmario,

[This snippet](https://github.com/gravitywiz/snippet-library/blob/master/experimental/gw-checkbox-to-list-field.js) should do the trick. It adds a new row to a List field with the checkbox value as the value in the first column of the newly added row.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [September 24, 2023, 7:10pm UTC](https://community.gravityforms.com/t/dynamically-populate-a-list-field-from-answers-provided-in-previous-question/15760/3 "2023-09-24T19:10:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
