Adding a loading indicator to form submission module I have a custom module that is altering a webform to add custom submission handling using:

$form['#submit'][]='paymentComplete';


From the time the user clicks the submit button, until the paymentComplete() function completes it takes 2-3 seconds, but the user experience doesn't really indicate what is going on. How can I add some type of 'waiting indicator' that starts right BEFORE the request to execute paymentComplete()?
AFAIK there are no OOTB features in Drupal yet but perhaps you can implement ProgressButtonStyles by Codrops. See https://github.com/codrops/ProgressButtonStyles for more info...