Allow me to introduce you to two Gravity Forms add-ons that I recently developed and have been putting to good use. They are…
I've recently been developing a number of registration forms. Most online event registration forms only allow for registration of an individual. This makes processing, payment, and registrant records easy. However, a few of my projects required a portal for group registration. This can be a tricksy beast to slay on several fronts. I will post later on a powerful tandem form solution that I'm using to solve this. For now, I want to share two of the tools I developed to enhance the registration forms I've been creating.
How to Count Group Registrants
The first issue I encountered was the need to count the number of group registrants listed on a form. Adding a multi-column list field can catch the info of group registrants. However, there was no way to capture the number of registrants (i.e., rows in this list field). Ideally, I wanted to count these rows and autoupdate a number, product, or quantity field, so that I could…
- update the cost accordingly, and
- properly limit the number of registrants.
To solve this first issue and get half-way toward solving the second, I developed Gravity Forms: Autofill List Row Count. This plugin extends Gravity Forms by adding an option that allows autoupdating the value of one field to match the number of rows in a list on the same form.
The option, Sync Field Value, can be found under the Advanced editing tab for fields of type number, product, and quantity. Simply insert the field ID of a list field on the form and when rows are added or removed from the list, the value of this field will be autoupdated to match the number of rows.
How to Limit Entries by Group Registrants
The second issue I encountered was the need to close the form after a certain number of group registrations had been submitted. Seeing as each group registrant was now recorded as an entry in a list field and not as a unique form entry, I was unable to use Form Settings : Restrictions to limit the number of entries. I needed a way for Gravity Forms to count each group registrant as a single entry.
To solve this issue, I developed Gravity Forms: Custom Entry Limit. When this plugin is activated, the option Summed Fields As Entries is added under Form Settings : Restrictions when Limit number of entries is checked. Enabling this option will tell Gravity Forms to utilize the total sum of values from specific fields you have identified in the form. Fields can be identified in a form by visiting a field's Advanced tab. Under Field Usage, check Include in sum for determining form entry limit.
Now, for example, if you have the form's entry limit set to 20 and you have three forms entries with seven group registrants each, you can properly shut down the form by having…
- counted the number of group registrants into a field (using GF: Autofill List Row Count),
- identifying that field for inclusion in the sum that determines the number of form entries (using GF: Custom Entry Limit), and
- enabling limiting of entries by the summed fields in Form Settings
This plugin also introduces a few gravityform shortcode options. Use the parameter
action="entry_count" to show the current number of "entries" that have been submitted and the parameter
action="entries_remaining" to show how many entries remain until the form will be closed.
A Few Additional Notes
I would be remiss if I didn't give credit to Gravity Wiz. A couple snippets they've available on their site were wrangled for use in these plugins. Thanks!
I should also note that they have Gravity Perks that are (or may soon be) available which could better serve to meet these needs. I'll be keeping my ear to the ground for that, as I would rather lean upon a premium plugin for such things rather than my own cobbled creations.
Disclosure: I may receive a portion of sales resulting from any affiliate links in this post.
Type On & Tell Your Story.
Add your email below and join the journey of a digital creative.