Topic: Multiple Forms, Simultaneous Submission

Hi all,

I am working on a site which interfaces with two different third-party form processors (web-form-buddy for validation and secure data transmission, SendThisFile for large file uploads). In order to achieve the desired effect, it's necessary to have two separate forms on the same page (one, INFO, which goes through web-form-buddy's CGI script, and one, UPLOAD, which copies some data from the INFO form and has file upload fields which goes through SendThisFile's servers).

I currently have a working page which, when you hit the Submit button at the bottom of the page, fires the INFO submission to web-form-buddy and then fires the UPLOAD form to SendThisFile (achieved using this method). If the user correctly inputs all required data, it works like a charm.  However, if the INFO form contains errors and fails validation, the UPLOAD form is still submitted.

Is there a way to have the INFO form report back whether or not it was successfully submitted, and only fire the UPLOAD submission if INFO passes its validation?

Thanks in advance for any help/advice.

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

Are you saying, you have not used any of your own PHP code, nore do you want to enter any PHP form validation into the exsisting forms that you are using. If so, then from the sounds of it you can use some JS  validation to make sure the form is filled out correctly before being  sent off. JS can be turned off...

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

Hmm. Sounds like some sort of validation on your side (before the form submits to web-form-buddy) may be the way to go.  One simple idea, though perhaps not ideal (since it would use Javascript for the validation, and that could be turned off) is to disable the submit button on the form until all the required fields have been filled in. Something along the lines of what I did here:

http://salthe1040gal.com/co nta ct.html (remove spaces)

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

You guys and your simple, logical solutions... that hadn't occurred to me at all. Thanks. It will have to be Javascript for now, as I don't know a lick of PHP, but I'll look into changing that in the near future.

Thanks again.

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

TrekkieTechie wrote:

You guys and your simple, logical solutions... that hadn't occurred to me at all. Thanks. It will have to be Javascript for now, as I don't know a lick of PHP, but I'll look into changing that in the near future.

Thanks again.

Here is some JS validation...

http://www.visibilityinherit.com/code/j … dation.php

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

Thanks for the code, Eric -- I used it as a jumping-off point for my own validation routines. Just wanted to let everyone know that I got my forms working properly and validating well. Thanks for your help.

Vote up Vote down

Re: Multiple Forms, Simultaneous Submission

Sweet -- good to know. smile

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down