Take a look at this form (submit if you want and check again):
http://gravity.chrishajer.com/2011/07/22/where-are-you-from/
Here is the code that accomplished it:
http://pastebin.com/SzDRRvN9
That's a pretty simple example, but it looks like you can use the gform_pre_render hook to determine how many entries have been submitted and subtract that from your limit.
My limit was overall for the form, not per day or week. Also, I appended the text to the description, which means you need to show the description. If you want to show it somewhere else in the form, you will have to adjust that. Also, I did not account for the singular "1 entries left" case when it gets to the last one. Finally, entries in the trash are counted against the total number of entries.
If you need help customizing this, please let us know.
Posted 13 years ago on Monday October 3, 2011 |
Permalink