Jump to content

Multiple Forms, Simultaneous Submission


TrekkieTechie

Recommended Posts

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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/js-form-validation.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...