forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: Αndré on October 09, 2014, 01:50:53 pm

Title: Disable submit button and display loader animation on form submit
Post by: Αndré on October 09, 2014, 01:50:53 pm
Extract of conversation below. Should be self-explanatory and applied to all submit buttons in Coppermine.

in order to avoid several touchs on the OK button by nervous users or users with mobile devices with slow connections not sure if the touched correctly the button or not, would be:

<form method="post" name="post" id="post" onsubmit="if(notDefaultUsername(this, '{DEFAULT_USERNAME}', '{DEFAULT_USERNAME_MESSAGE}')){this.submit.disabled = true;this.submit.style.visibility='hidden';return true;}else{return false;}" action="db_input.php">

[..]

Disabling users to multiple submits of the same comment and at same time giving them an inmediate visual feedback that the button was touched (by hidding it)

Instead of hiding the button, I'd suggest to replace the button image with the loader animation (images/loader.gif).