How to prevent double click on submit button?

Double click or Multiple clicks of a forms ‘Submit’ button could result in the form being submitted twice. Depending on the action of the form this could in turn send two enquiries, create two orders or insert a record into the database twice, and we don't want that.

So, Dolphin how to prevent double click on submit button? for example...

 

JavaScript: Preventing Double Form Submission

 

Maybe we will need such a feature. for Dolphin 7.3.5 new_topic.xsl is...

 

<input type="submit" name="post_submit" value="[L[Submit]]" onclick="tinyMCE.triggerSave(); if (!f.checkPostTopicValues(document.forms['new_topic'].topic_subject, document.forms['new_topic'].topic_text, document.forms['new_topic'].signature, document.forms['new_topic'].forum, true)) return false;" class="bx-btn" />

 
how to solve this problem?
https://www.insoler.com/ The first community site supports RAW photo formats !
Quote · 11 Apr 2018

Its annoying when submission happens twice.

Quote · 11 Apr 2018

Hello brentsu!

 

The easiest way for your request will be to add code before tinyMCE.triggerSave(); like:

document.forms['new_topic'].submit.disabled = true;


then go to admin panel->modules->forums area and there recompile all your language files.


With the best regards, Leonid

Quote · 12 Apr 2018

Hello LeonidS,

 

Thank you for reply and thanks to Sureandhraindia's support.

I add code before tinyMCE.triggerSave(); and recompile all form language files, like this:

Then double click the send button in the forum... However, two discussions will still be posted. Click the first post will see this error message:

Whether it's a user or a administrator (me) can't delete the wrong first post! So I use phpMyAdmin to view the database. Although the data is repeated, the topic_id number in the bx_forum_topic looks normal.

In the bx_forum_post datasheet, the post_id number is correct, but the topic_id is the wrong number. The correct ID number should be 18266.

bx_forum_topic01.jpg · 482K · 23 views
bx_forum_topic02.jpg · 244.6K · 22 views
bx_forum_topic03.jpg · 207.3K · 16 views
bx_forum_topic04.jpg · 288.8K · 11 views
https://www.insoler.com/ The first community site supports RAW photo formats !
Quote · 14 Apr 2018
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.