PDA

View Full Version : Multiple Forms with Multiple Captchas on one page


Martin
09-20-2009, 12:52 PM
Greetings,

First, this is a nice extension... =) However, I am not sure if this post should be in this forum or in the Universal E-Mail forum.

But since I think the issue is with Captcha Validation, I will post it here.

Currently I have a site that requires several forms on one page inside JavaScript tabs.

Ok, no problem inserting and configuring the forms, getting them to validate etc.

http://www.sierracentre.ca/contact.php if you want to have a look.

First there is a simple contact form, then an appointment form and a finally a job application form. All three forms validate properly and display different captcha images.

However, when I use Universal E-Mail to generate the e-mail from the form, only the first form (the contact form) actually works.

The other two come up with an ?invalid=true upon submission. I think this is somehow because the captcha may be validating to the wrong session?

Am I on the right track?

I know that three forms on one page is not the norm, but for this site it was necessary and I am going to be doing the same thing on another site soon.

Any help would be appreciated!

Thanks,

Martin

Jason Byrnes
09-21-2009, 12:08 PM
Each form will need to have a submit button with a unique name.

There will also be a separate Server Validation server behavior to validate the captcha for each unique form. The trigger for the validation will need to be set to the Submit button: <Name of button for that form> pressed trigger.

My guess is that the server validations are set to se the currant page submit trigger.

Martin
09-21-2009, 12:34 PM
Hi Jason,

Thanks for getting back to me. To provide you with more information. Each UE is triggered by the associated submit button for that form. So the Contact is triggered by the contact button, the Appointment form is triggered by the appointment button and so on...

I still think that even though I have three separate captcha instances, somehow the session is returning invalid true because the captcha is validating to the wrong session.

Digging into it a bit further when I go to the Server Behaviors panel and check the "validation show if" for the captcha, it is set to Validations Fail on any and then an associated like entry for the Captcha session.

So that is looking correct to me... Any ideas why the Appointment and the Job App form are returning invalid true?

Thanks,

Martin

Jason Byrnes
09-21-2009, 01:13 PM
can you send a cop[y of the page so I can take a look.


It is most likely that the Server Validation server behavior is not set to the unique button pressed trigger, but I need to see the code to tell for sure.