Click to See Complete Forum and Search --> : Dynamic Form Generation


mili
04-09-2003, 01:50 PM
DYNAMIC FORM GENERATION

I have a dynamic form where a user can fill out any number of fields in a form.
I have a small peice of JS that adds table rows with form fields by clicking a button (plus).
Each row contains a drop down select box with 3 values.Each value in the drop-down is associated with a form.
Ex: On selecting value 1 from the drop-down, I should populate form 1 and so on.(I have a JS for this as well)

1.The problem is, it populates the form ouside of the table. I want it to appear under the select box.Now when I add a new row using the plus button, I want to display another select box after form 1.The value selected from this box should populate the corresponding form under it and so on...(I have this partially working)>How can I do this?

2. I have a minus botton that deletes the last row from the table.Instead,I want to be able to do multiple delete by clicking the check box.This delete function should delete the entire section including the form.How can I do this?

I've attached a zip file of my partially working code.

thanks in advance.

mili
04-09-2003, 07:33 PM
please can some one help me fix this problem?

thanks

angrytuna
04-09-2003, 08:09 PM
I took a look at your code, and I'm not sure from your message or your code exactly what you're looking for.

I'm guessing that you want new forms to be written on the same page following the contents of old forms that have been filled in, and you're having trouble doing this.

Is this correct?

~at

mili
04-10-2003, 08:53 AM
Yes! on top left corner are two buttons + & -.
+ adds new rows to the table with a drop down list of class name.
When I do onchange event on the select box, I should display the corresponding form below the class name (which works currently, but displays outside of the table of class names)
Now when I hit +, I should add another row with class name drop down list (which works)
Onchange event should again display another form below.
Essentially I want to display this way:

class Name: classname 1
DISPLAY FORM1
Class Name: classname 2
Display Form 2
Class Name: classname 3
Display Form 3

Class Name fields are dynamically generated by the JS.

Does that make sense? Sorry,I'm not good at putting things to words!

Thanks