Closed (duplicate)
Project:
Webform
Version:
6.x-2.7
Component:
Miscellaneous
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2009 at 19:54 UTC
Updated:
20 Jan 2010 at 23:19 UTC
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