Is it possible to add a new time frame limit of 5 minutes in the list of available time frames?
Available time frames are
Per user submission limit

  • Ever
  • Every hour
  • Every day
  • Every week
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Sounds like a good idea to me. I don't know why we don't have that option already. Although if you're thinking of limiting users to "1 submission every 5 minutes", your users may be frustrated by such a restriction. Imagine if you had someone contacting you, but they forgot to say something in the first message and tried immediately again. They'd be much better off with a "2 submissions every 10 minutes", or even better, "3 submissions every 15 minutes". The most spam you'd receive is 3 messages instead of 1, but your end users would never accidentally hit the limit by making submissions close together.

So thinking this way, I agree that "1 hour" probably too long for some limits, but 5 minutes is probably too short for most situations. But ultimately, what lengths are appropriate depend on your use-case.

maustyle’s picture

I see what you mean.
This really had to do with another issue. Apparently the webform submitted multiple times instead of one. Resulting in 4 emails sent and 4 results. So that's why I wanted to restrict the submissions to 1. Any ideas on why that would happen?
Back to this issue, for the purpose of my website 1 submission every 5 minutes is okay. I think that it must be possible to hook the PHP code to add more custom time frame options, but I would not know where to go.

quicksketch’s picture

To prevent accidental double-submissions, a module like http://drupal.org/project/honeypot might be better really. Then you could set the timeframe to a couple seconds to prevent the "double click" problem.

maustyle’s picture

Thank you but the Honeypot module doesn't seem to work properly like the webform cookie restriction. I would love to know where to start looking to set a 5 minutes restriction on it. Could you please help?

quicksketch’s picture

Issue summary: View changes
FileSize
48.62 KB

Hm, actually I looked at Honeypot again and you're right that it doesn't stop repeated submissions to the same form. It only stops the *rapid* submission of forms, so the user has to wait a few seconds before submitting the form after the page has been loaded. We still don't have more granular options for limiting users, so this issue is still valid.

smira’s picture

this seems to add minute interval submissions which is what i needed, it might help you as well...

DanChadwick’s picture

Version: 7.x-3.17 » 7.x-4.x-dev
Component: User interface » Code

I don't see any harm in offering 1 and 5 minute options.

DanChadwick’s picture

Status: Active » Fixed
FileSize
1.89 KB

Added 1 and 5 minute limits to total and per/user limits. Committed to 7.x-4.x and 8.x

  • DanChadwick committed 3c9e123 on 7.x-4.x
    Issue #1593870 by DanChadwick: Added 1 and 5 minute total and per user...
  • DanChadwick committed 980dfef on 8.x-4.x
    Issue #1593870 by DanChadwick: Added 1 and 5 minute total and per user...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

commonpike’s picture

This really had to do with another issue. Apparently the webform submitted multiple times instead of one.

I'm having this. The submissions appear (in the results) as having been submitted at the very same second (by the same user, same ip, etc).
However, setting the limit to 'one per user, per day' does not prevent this either (weirdly). So 5 minutes would not help me, I guess.