2

I have a form built in Joomla 2.5 and ChronoForms, the form validation been done using MooTools. However in Chrome browser when I click multiple times the submit button, that many number of records get saved. This is not the issue in Mozilla or IE.

Is it a Chrome specific issue??

How can i disable the submit button on success of the validation??

Any feedback or solution is appreciated.

Regards, happy coding

artlung
  • 33,305
  • 16
  • 69
  • 121
opensource-developer
  • 2,826
  • 4
  • 38
  • 88
  • Can you post the submit/ajax code you have? or a link to the problem?or a jsfiddle... – Sergio Sep 21 '13 at 08:21
  • Actully iam using Joomla and chronoforms and it internally uses mootools for validation. Iam anot sure which code i should paste. Its a strange issue, i have been goggling for more than 2 days but unable to find the solution. When i submit the form data is getting saved multiple times. This is happening only on chrome. I am trying to disable submit button after success of validation but iam not able to do it. The submit button gets disabled the first time i click the submit button but i want it to get disabled only after the success i.e not validation errors on page. – opensource-developer Sep 22 '13 at 09:01
  • I want to help you on this but you posted no code. Do you have a link to the problem? – Sergio Sep 22 '13 at 11:56

2 Answers2

1

I figured this by adding a JavaScript code, which disabled the submit button after it was clicked and there were no validation error.

I had to modify some of the files from chronoform library to do this because when i added a normal JavaScript code, it used to disable the button after the submit button click, it did not check if the validation was fired or not, So, if the validation was fired i was not able to correct the validation error because it disabled my submit button.

opensource-developer
  • 2,826
  • 4
  • 38
  • 88
0

Maybe check this "Prevent Double Submit" thread on the ChronoEngine forums:

http://chronoengine.com/forums/viewtopic.php?f=2&t=22439

Neil Robertson
  • 3,295
  • 3
  • 28
  • 49