Forums

How To Properly Use "Confirmation Page" Utility

wagman67 02 May, 2012
Using Chronoforms 4.0 RC3.3 in Joomla 1.5

I am building a simple registration form for a golf tournament. I have all of my fields working the way I like.

When I include a "Submit Button", I find that accidentally pressing the 'enter' key causes the form to submit at that point. I want to avoid this by placing a confirmation, but am unsure how to properly do so.

In the 'Event' tab, I have the two standard sections: "On Load" and "On Submit".
In the "On Load" section, I placed "Show HTML".
In the "On Submit" section, I placed "DB Save", "Show Thanks Message" and "Email-Send Email".

I have everything configured and it works great (saves the data properly, shows a thank you message, and sends an email with the information it needs to). The only issue is accidentally fat-fingering the 'enter' key.

Am I supposed to place the "Confirmation Page" in the 'On Load' event? When I do so, I get a "Submit" button and a "Cancel" button at the bottom of my form. I removed the other "Submit Button" from the main form body.

This seems to work great, until I actually hit submit. Hitting the 'enter' key does nothing (exactly what I want), but the data does not flow to the database, no email is sent, and the forms seems to refresh empty and the 'submit' and 'cancel' buttons disappear.

Can someone tell me how to properly use this, or is there a simple solution to not submitting the form when 'enter' is pressed on the keyboard (in other words, make them have to click the 'submit button').

I am not a coder and this is my first attempt at using Chronoforms, which seems like a great product.

Thanks for your help.
GreyHead 03 May, 2012
Hi wagman67,

The usual answer to this is to add validation to your form so that even if Enter is clicked the form won't submit if the required fields aren't complete.

Alternatively there are JavaScript snippets that will disable the Enter key - see this article by David Walsh for example.

The Confirmation Page action I think goes in the On Submit event after any Check Captcha or ServerSide Validation action. There are some threads here about using it.

Bob
wagman67 03 May, 2012
Thanks...I kinda went low tech with this. I inserted a captcha at the bottom, before the submit button and made it required. If someone fat-fingers the enter key, it takes them to the captcha box, which should make them realize they need to finish the form properly. It was needed anyway and it gets the job done.

I needed to play around anyway and do some learning.

Thanks
This topic is locked and no more replies can be posted.