Click to See Complete Forum and Search --> : form - FormMail.pl


JScriptUser
07-15-2003, 12:32 PM
Hi!

So far, I've always created a static form and had it posted to FormMail.pl. For the first time, I created a dynamic form that uses div and separates a portion of form with next and prev buttons.

How can I get FormMail.pl to see all the div forms inside of the big form?

I nested all the div forms in the big form that sends to FormMail.pl but it sees it as an invalid markup in html and sends only the first div form to FormMail.pl.

I know that this can be done but I don't know how.
Can anyone help me?

Jeff Mott
07-15-2003, 12:38 PM
Do you have this all on one page? You cannot have nested FORM elements. Only one FORM should enclose all the input controls you wish to be submitted.

But it is hard to judge your situation. You may have to post your code so we can get a better idea.

JScriptUser
07-15-2003, 01:00 PM
Hi!

Oh well, here is the code. :)


<form action="cgi-bin/pment/FormMail.pl" method="POST">

<div id="part1" style="position:absolute;top:150px;left:50px;visibility:visible;">
<form name="visitor_info">
<table>
<tr><td>Your name:</td><td><input name="visname" type="text"></td></tr>
<tr><td>Your phone number:</td>
<td><input name="phone" type="text"></td></tr>
<tr><td>YourZip Code:</td><td><input name="zip" type="text"></td></tr>
</table>
<input type="button" value="next"
onClick="switchIfDone(this.form, 'part1', 'part2');">
</form>
</div>

********************* More divs ********************

##### This is the last div that has a submit button #######
<div id="submission" style="position:absolute;top:150px;left:200px;visibility:hidden;">
<p align="center">Please submit the workshop registration when you are done.
<input type="button" value="prev"
onClick="switchDiv('submission', 'part3');">
<input type="submit" value="Submit" name="B1"></center></p>
</div>

</form>

Did you see the big form that encloses the small div forms?

I know that this is syntactically incorrect. It only sends the first div form now. If you help me debug this, I think that FormMail.pl will be able to see all the textboxes in all the div forms.

Thanks again!

Jeff Mott
07-15-2003, 01:04 PM
I know that this is syntactically incorrectIt's not, actually. :\ As I said in my initial post, you cannot have nested forms. The tags for the inner form must be deleted.