Poll - Release Time Limit at specific time (like midnight)?

I’m looking at using the Poll Add-on and it looks like a great fit. However, I have so far only found that the time_period can be set for…just that a period. I have tested the GravityWiz code snippet as well. But not really being a programmer, I’m not clear if it can be altered to release the limiting cookie at a specific time rather that a period based on the user’s entry. I just wasn’t to restrict voting until midnight each day.

The GravityWiz snippet is here: https://gravitywiz.com/better-limit-submission-per-time-period-by-user-or-ip/

Can you use the time_period of one_day? That should reset at midnight.

Thanks Chris. I will test that. I don’t recall seeing “one_day” as an option. I do see “per_day” and reading the doc again, maybe it does reset at midnight even though it doesn’t specifically say that. Could be why I overlooked.

I was referencing this section:

Also supported are three different calendar periods: per_day , per_month , per_year . Calendar time periods are more rigid time periods that “reset” when the calendar time period expires (i.e. one month ends and another begins).

Sorry, yes it’s per_day. But if you change month to day in that sentence it becomes:

one day ends and another begins

Test it out and let us know, or leave a comment on that Gravity Wiz post.

Chris,

Quick question. I’m a little confused whether the settings I put in the Gravity Forms Poll Add On - Poll Settings are completely overridden by the GW function. Meaning, if I set the Poll to use a cookie and set on Never or 1 Day, will the function of settings the limit to “per_day” still reset it based on a cooking at midnight?

What hoping is that the combination of setting the cookie but having the time_period be per_day will clear the cookie at midnight, rather than having to use an IP or user. Suddenly, I’m thinking this will not work. That the function doesn’t use a cookie and/or will not use the cookie set via the Poll Settings.

Hey Chris, it does not seem that the Gravity Wiz snippet per_day will override the setting within the Poll Add-on. Meaning, I want the Poll to limit by cookie. But the Gravity Wiz snippet does not have a cookie feature as far as I can tell. It’s only by user, IP or embed URL. Ryan at GW suggested I buy the Perk plugin version and he could help. But since the docs for it say nothing about cookie limits, I have a feeling it’ll just be a 30 day trial. It seems like the Poll add-on itself would need additional options for the cookie limit that aren’t based on hours but rather more like the calendar day options. Too bad I’m 90% designer and not enough developer.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.