Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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)

Posted

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.

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...