problem with chronoform v4 submit [RESOLVED]

johnny64 23 Dec, 2013
:D Hello, I have a problem with chronoform v4 on joomla 2.5!
I created a form that allows me to save data to mysql database, upload files and send email. Everything works fine but sometimes happens when you press the button submit the form continues to persist in the video (Show Thanks Message isn't returned immediately) and you can then click on the send button causing the insertion of duplicated on databases, and the sending of email all the same. I can not solve this serious problem.😢 The Actions panel-> OnLoad contains Load CSS for styling and Show Html while the Actions panel-> OnSubmit contains actions Anti Flood [GH], Multi Page (Unique Session Key = Yes), Show Thanks Message, Uploading files (OnSuccess = empty OnFail = EventLoop), DB Save, Email[GH]. The form is clientside validate.
Do you have any suggestions for me? thanks
johnny64 27 Dec, 2013
:D Hi Sloan Thrasher! First of all i want to thank you for your reply. I tried the code and it works perfectly but there is a drawback, if the form is not filled out and press submit button is disabled and the form it is no longer usable. For example, if a field is filled in incorrectly and you try to send the form with submit, the form is not sent because the client side validation invites you to change the field incorrect and even if you do it you can not submit the form because the button is disabled. We need a function that intercepts the validation condition of the client side validation and if true after the submit disables another submit. I also have a server side validation but that should not be a problem because on fails the form is reloaded and the submit function is restored. :? Can you help me find a solution? Thanks so much! John
GreyHead 27 Dec, 2013
Hi johnny64,

It is probably possible the way that Sloan suggests but you have to tie it in to the validation code. I'd suggest that you try my Anti-Flood [GH] action instead. This works after the first submission to block any more submissions from the same user for a specified period - five minutes is probably about right here.

Bob
johnny64 27 Dec, 2013
:D Hi Bob,
I have already used your Action Anti-Floog [GH] (as you can see in my post is the first action set in OnSubmit event) but can not block all submit! Before intervening some submit pass and my database is full of duplicates! I think it is fundamental to intercept the true function validate of client side validation which enslave the javascript code that Sloan suggests. How can I do? Thank you for your valuable advice.
Johnny
GreyHead 27 Dec, 2013
Hi Johnny,

If the Anti-Flood isn't working then there may be some other cause for the duplicate entries. If you want to try disabling the submit button then the code you need is in this FAQ (ignore the parts about the loading image though).

Bob
johnny64 28 Dec, 2013
:) Hi Bob!
Just what I needed and it works wonderfully! You have solved a very big problem for me! 😀 Thank you so much.
With appreciation
Johnny
This topic is locked and no more replies can be posted.