PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Dynamically add number of fields based on previous field

  1. Haris
    Member

    I am building a website for my client on which I'm using gravity forms to build a self-assessment form.

    I want to dynamically add more fields depending on the number selected from a previous field. For e.g, how many children do you have? When select a number from the drop-down list, it should automatically add fields for the children name, date of birth and education. How can I achieve this?

    Posted 14 years ago on Thursday January 14, 2010 | Permalink
  2. Right now there is no way to dynamically add fields based on a drop down selection.

    The only thing you could do is use conditional logic. Create a section for each of the number of children options that contains the necessary fields. If they choose 1 child then show the section for 1 child.

    Please note that you can apply conditional logic to an entire section simply by turning on conditional logic for just the section break field. So you don't have to apply it to every field, just use the Section Break field and apply it to that one. Any fields appearing below the section break will inherit the conditional logic... until it hits another Section Break.

    So you would do something like this...

    - Select Number of Children

    - Section Break For 1 Child (conditional logic applied)
    - Fields for 1 child

    - Section Break for 2 Children (conditional logic applied)
    - Fields for 2 children

    - Section Break for the continuation of the rest of the form (this is important if you apply conditional logic to the Section Breaks as it needs to know to end that conditional logic so you need a Section Break that doesn't have it applied to it).

    Posted 14 years ago on Thursday January 14, 2010 | Permalink
  3. I was wondering if this functionality was now possible with all the many enhancements to Gravity Forms over the past two years? It would be super helpful if it was, please let me know...

    Posted 12 years ago on Wednesday December 5, 2012 | Permalink
  4. Looks like this now can be done..for anyone else looking, here is the link:

    http://gravitywiz.com/2012/06/03/set-number-of-list-field-rows-by-field-value/

    Posted 12 years ago on Wednesday December 5, 2012 | Permalink
  5. Gravity Wiz to the rescue.

    Posted 12 years ago on Thursday December 6, 2012 | Permalink

This topic has been resolved and has been closed to new replies.