sketchgal — 2012-03-27T15:49:28-04:00 — #1
Can anyone please help with the following.
I have an email attachment form which I have set up.
It is set up so that it has a few fields which are required fields and others which are optional.
The form works fine and sends the attachment etc.
The issue is that when someone chooses to send a large file attachment they think the form doesn't work because it takes longer to process.
I've added an ajax loading image which works fine and should solve the issue but I obviously have the code in the wrong place on the page becasue the loading image shows whenever I click the submit button and I only want it to show once the form has been checked for validation errors. If the form finds no validation errors it shoudl then show the code.
Can anyone help with this please?
Here's an example of the file thats causing the problems:
Any help would be greatly appreciated with this. Thanks in advance.
sketchgal — 2012-03-27T16:17:29-04:00 — #2
Can anyone out there help please?
Instead of this kaku newton who clearly doesn't have a clue!
paul_wilkins — 2012-03-27T17:41:03-04:00 — #3
First of all get rid of that onclick event for the submit button.
The validator that you're using doesn't seem to allow you to excute other code before the form is submitted. Other form validators have a submitHandler to which you can assign other code.
So with your own form validation script there, you could instead add a custom form validation, which will get executed after all of your other form validations have successfully passed.
It might look something like this:
sketchgal — 2012-03-28T11:43:58-04:00 — #4
Thanks in advance.
paul_wilkins — 2012-03-28T15:45:13-04:00 — #5
You can put it with the rest of the code that sets up your validation requirements.