Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello. I love this module! One issue I'm running into is that we sometimes want to limit the number of times a given form can be submitted, e.g. to limit the number registrations for an event. As a temporary fix I'm using the following code in the "Additional processing" field:
# Unpublish the form if it has more than 22 registrants.
$count = db_fetch_array(db_query("SELECT COUNT(sid) AS regs FROM {webform_submissions} WHERE nid = %d",$node->nid));
if ($count['regs'] > 22) {
$node->status = 0;
node_save($node);
}
But it would be nice if we could have that as a setting in the form instead. Is there an existing module or patch that adds this functionality? If not, I may be motivated to contribute one. :-) Thanks again.
Comments
Comment #1
quicksketch#503264: Limit the total number of submissions