I have extended the module to include an option to close a webform at a specified date as well. At this moment the logic first checks to close the form based upon date. If that is okay, then it closes if max submissions have been reached. If either the cut-off date or max submissions figure gets changed, the form will automatically close or re-open as required by the new values.
The code includes the suggested changes from span (http://drupal.org/node/1211752#comment-4734466) and emastyle (http://drupal.org/node/1177624#comment-4675276).
Please take a look and see if you agree that the functionality is related enough to be paired in the same module.
I cannot decide whether an additional field is required to specify whether date cut-off or max submissions should be the 'senior' deciding factor as to whether a form is closed or not. Input appreciated.
Another outstanding thing is to get the jquery datepicker working on the limit submissions page as well.
Because I've doubled the size of the source file I'm attaching my .module (lose the .jpg extension) file rather than a patch file.
Comment | File | Size | Author |
---|---|---|---|
webform_limit_submissions.module.jpg | 7.88 KB | vernond |
Comments
Comment #1
vernond CreditAttribution: vernond commentedComment #2
DonnyCarette CreditAttribution: DonnyCarette commentedThanks vernond, nice work!
I will take a look to the code to add a new release.
There will come more features soon
Comment #3
DonnyCarette CreditAttribution: DonnyCarette commentedVernond,
I did a quick review of your code, more in a couple of days
Comment #4
vernond CreditAttribution: vernond commented@DonnyCarette - Cool, let me know what I can do to help.
Comment #5
paul.dambra CreditAttribution: paul.dambra commentedI've just tested this and had to add
module_load_include('inc', 'webform', 'components/date');
above the use of
_webform_render_date
but other than that it works perfectly for my needs. Many thanks!Comment #6
DonnyCarette CreditAttribution: DonnyCarette commentedCode worked fine so added in new release 6.x-2.2
Closing this issue as fixed, thanks again for the extra feature!