"Add" button to add additional forms for submission (reusable component?)
Posted on 2003-10-24
I have to customize yform.cgi, to allow for multiple requests of bottle collections. Right now, it is statically set for 18 different bottle collections (there are 18 identical forms hardcoded in my script). However, I'd like for the form to display only one form for bottle collection, by default, and have a button, entitled "Add Form", which will return a new form for bottle collection, every time this button is pushed, so that anywhere from '1n' to 'n-1' forms will be generated at the push of this button. I'm assuming I have to have a function with the form, and have it called every time the button "Add Form" is pushed .. but I'm really fuzzy about the implementation. Can anyone please help me out?