multiple submition
Hi,
I have an insert record and send email form which is submitting the values onto the db multiple times.
how do I stop this?
Hi,
I have an insert record and send email form which is submitting the values onto the db multiple times.
how do I stop this?
I can't spot the problem. Are both inserts the same values? Do two emails get sent?
Yes the emails and the data is stored onto the db.
My customer is completing the form by using his mobile phone.
He is keep pressing the submit button to test the form and about 4 to 5 same records are added onto the db table.
is there a way to add submit once?
I tried to submit once and disabled the button however isn't a good idea as if the user has not completed the required fields, and submit the button, they will be unable to press the button again once the required fields have been successfully completed.
Any idea how to bypass this issue?
Looking forwared to your reply.
Thanks
You could probably check to make sure all of the fields are valid before disabling the button.
Are you using the webassist jquery form validation? If so, then it would be something like:
onclick="if ($('#form1').h5Validate('allValid')) document.getElementById('submit').setAttribute('disabled','true');'
You would have to give your <form> tag an id="form1" attribute and add the onclick event to the submit button.
Hi Ray,
I added the jq validation but still the same issue.
The issue only happens with google chrome.
Can you please have a look the file for me and let me know why the button isn't disabled after the first submission?
Looking forward to the solution.
Thanks
It looks like this file was not uploaded:
/webassist/jq_validation/jquery.h5validate.js
it needs to be on the server for the jquery validation to work.
hi,
I have now uploaded this file and still the same issue with google chrome.
it submits multiple times when I keep clicking the submit button once all the fields are complete.
any other ideas on how this issue can be fixed?
The path now seems wrong on the page.
You have:
<script src="/home/businessmobile/www/www/webassist/jq_validation/jquery.h5validate.js"></script>
and
<link rel="stylesheet" href="webassist/jq_validation/Midnight.css" />
it should be:
<script src="/webassist/jq_validation/jquery.h5validate.js"></script>
and
<link rel="stylesheet" href="/webassist/jq_validation/Midnight.css" />
the problem is still there.
I've added a dreamweaver behavior (show/hide).
the button is hidden on submit which will not allow people to resubmit the form.
This is the workaround fix I managed to apply.
can you please let me know if within yoru ext there is an option which I can quickly apply to show a loader while the form is submiting the vals into to the db?
You should be able to use: WebAssist->Forms->Progress Bar to show a loader and stop multiple submissions that way.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.