Submit Once

Component ID

1651102

Component name

Submit Once

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

419

Component created

Component changed

Component body

This module has hit a conceptual issue. Since the form_build_id changes throughout the lifetime of the form, there seems to be no way to identify a form such the user can't go back and submit it...

For a different approach, try
http://drupal.org/project/hide_submit or
http://drupal.org/project/block_submit

If there was a way to identify a form instance this module would provided two mechanisms to prevent forms being submitted twice
On the server side, there are form validate and submit callbacks to prevent the submit function running twice for a given form_build_id
On the client side the following javascript can be added to form buttons,
this.disabled=true,this.form.submit()

For site builders

A config page would allow admin to write the form_ids of affected forms

For module developers

In your form or form_alter function, you would call
submit_once_php(&$form);
or
submit_once_js(&$form);