The current count of submissions is fetched from wrong table.
To obtain the correct count of submissions you have to change the table where get the count.
Change the line 103 from:
// Count the current total of submissions in the database
$count = db_result(db_query('SELECT count(*) FROM {webform_submitted_data} WHERE nid = %d', $node->nid));to:
// Count the current total of submissions in the database
$count = db_result(db_query('SELECT count(*) FROM {webform_submissions} WHERE nid = %d', $node->nid));
Comments
Comment #1
donnycarette commentedThanks, i will release a new version soon
Comment #2
donnycarette commentedAnd new release 6.x-1.3 with fix is online
Comment #3
emastyle commentedThe module close the form when max allowed number of submissions is reached on the next form load, but if two user submit the form at the same time the code not check if form is already close.
So, if you want to stop users submission when effectively max allowed number of submissions is reached, add this function before
function webform_limit_submissions_nodeapi:This function check if max allowed number of submissions is reached on presave operation (as nodeapi definition http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...). If the limit is reached the node is reloaded without insert the data in the database and the "close message" appears.
Comment #4
donnycarette commentedReopening the issue, new release will soon be added
Thanks emastyle for pointing out
Comment #5
donnycarette commentedComment #6
donnycarette commentedFixed in the 6.x-1.5 release
Emastyle, thanks for pointing out!