Forums

Display dynamic number of fields based on value of another field

karae 18 Sep, 2018
Hi all,

I'm pretty new to CF and I'm creating a signup form for a company in which they specify how many people will be attending an event and have to provide the attendees' names.

I'm wondering if there is a way to have the number of 'name' fields show up dynamically depending on the number of people indicated?

E.g. if 3 people are attending, then 3 text fields show up to enter the names
GreyHead 19 Sep, 2018
Answer
1 Likes
Hi karae,

You can do this with a Multiplier element where the user clicks an Add button to add extra attendees; or, perhaps better, I would probably use a multi page form where you gather the basic data - including the number of attendees - on the first page; and on the second page you can load the required number of 'Name' inputs using a Multiplier set to that number.

Bob
karae 19 Sep, 2018
The multiplier worked perfectly for what I need - Thanks so much Bob!
This topic is locked and no more replies can be posted.