just a request:
Make the submit buttons disabled with JS after submit so user doesnt think he didnt submit form (on slow server may happen).
I guess we can assume most users have JS enabled.

Comments

imclean’s picture

Instead of hacking the module, my quick and dirty solution is to add some js to my theme's js file, in this case, functions.js:

$(".webform-client-form #edit-submit").click(function() {
	$(this).attr("disabled", true);
	$(this).attr("value","Please wait...");
	var frmID = ($(".webform-client-form").attr("id"));		
	$("#" + frmID).submit();
});

To add the JS file, stick this in your template.php:

drupal_add_js (drupal_get_path('theme', $GLOBALS['theme_key']) . '/functions.js', 'module');

This adds the function to all webforms. If you only require it with certain ones then modify the code as necessary.

maxferrario’s picture

You could also try to use the "Block submitting twice" module: http://drupal.org/project/block_submit

quicksketch’s picture

Status: Active » Closed (won't fix)

I think it would make sense to have this be provided by a separate module (as recommended by maxferrario). This problem exists on just about all forms in Drupal (comments, nodes, settings forms, etc.)