NoDoublePost
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
Prevents nodes from being saved by using the form build token.
Drupal 7.
See http://drupal.stackexchange.com/questions/68601/how-to-prevent-accidenta...
Use the 'form_build_id' to prevent duplicate submissions. This is located at
$form_state['input']['form_build_id']
(drupal-7) and is generated with each form load.
See created module: http://drupal.org/sandbox/interlated/1963144.
A database table or widget field would be required to store it with each submission. Ideally the table holding the field would be locked. In a validation callback or node_save hook. A specific field per content type to prevent too much locking. The validation messages drupal_set_message() saying that multiple submissions were detected would still display. In practice the locking may become too cumbersome, so a cron job is required to clean it up.
