Closed (fixed)
Project:
Webform
Version:
5.x-2.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2008 at 13:35 UTC
Updated:
14 Jun 2008 at 22:52 UTC
The way the defaults are set (enforce limits, empty submit limit) it seems to have the net effect of a limit of one per user, because a zero is written to the db for submit_limit.
From what I can see, the problem seems to be that the logic depends on submit_limit needing to be set to -1. Personally, I think logically if the submit limit is zero (or left blank) that should be equivalent to switching to enforce_limit to off (-1). Currently a zero (or blank) results in a true value being returned from _webform_submission_limit_check, which effectively means that a user can only submit once.
I've attached a patch which should fix this.
| Comment | File | Size | Author |
|---|---|---|---|
| fix_limit.patch | 406 bytes | mandclu |
Comments
Comment #1
mandclu commentedComment #2
quicksketchThanks, I already fixed the problem that made this problem apparent. -1 is supposed to be the default (unlimited) not 0. However, this brings up the problem that the value of 0 is not handled properly. "0 submissions ever" should essentially prevent further submissions of the form, though currently it's treated the same as 1 submission ever.
I'm going to wait on fixing this particular problem though until after http://drupal.org/node/239343, since they overlap in code.
Comment #3
quicksketchAn easy fix: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/webform/web...
A submission limit of '0' now effectively disables further submissions, rather than allowing a single submission.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.