I've got a form that's being generated using the Form API. There is a fieldset that contains several text fields. What I need to do is have a link or button that a user clicks if they want to add a duplicate of that fieldset to the form so they can add another set of similar information to the form. This is to essentially allow them to add multiple records without having to add each record individually. Is there a good way to go about adding this kind of functionality using the Forms API in Drupal 7?
Asked
Active
Viewed 2,885 times
1 Answers
3
There's a good example of this in the examples module package:
It's a little complex, but that is very well documented, so you should be able to follow along.
You'll want to look at the entire ajax_example module (part of http://drupal.org/project/examples) for the relevant menu callbacks as well.

Sean Robertson
- 353
- 1
- 8
-
That was a lot of help. Thanks! I've got it sort of working. Could you check out my other question and see if you have any thoughts. It's here: http://stackoverflow.com/questions/12831363/drupal-7-forms-api-ajax-forms-error-an-illegal-choice-has-been-detected-plea – LoneWolfPR Oct 11 '12 at 03:12