September 26, 2020: Added support for limiting how many times a given choice is selected by Round Robin via GP Limit Choices.
Overview
Imagine you have a form where you’d like to automatically cycle through the choices of a designated field with every entry. The cycle starts with the first choice, progressing to the next available choice on each submission. After each choice has been assigned, it will restart from the first option.
The practicality of this is for any task-oriented form, such as sales leads, support requests, or a shift scheduler. Whatever choices are stored in the choice-based field will be cycled for each submission, evenly distributing the values across all submissions in a first-in-first-out basis.
Using the Snippet
Prerequisites
Confirm that you have Gravity Forms installed and activated and that you’ve installed the snippet.
Add a Drop Down Field
With the snippet installed, add a Drop Down Field to your form and set the choices to the different values you want to cycle through. This field will automatically be hidden by default.

Update Snippet with Form and Field ID
Update the form_id
and field_id
in the snippet to match your Form ID and the Field ID for your Drop Down from above.
new GW_Round_Robin( array(
'form_id' => 123,
'field_id' => 4
) );
That’s It!
When the form is submitted, the snippet will cycle to the next value in the Drop Down for every submission.
Parameters
- form_id (integer) (required) This is the Form ID where you want to cycle through the choices. There is no default value.
- field_id (integer) (required) This is the Field ID for the field where the choices are stored. There is no default value.
- hide_field (boolean) (optional) Automatically hide the choice-based field. The default value is true.
Taking It Further
This snippet should be considered a building block to create round robin forms. For an example of how this can be implemented in a real world scenario, check out the How To Evenly Distribute Leads to a Sales Team with Gravity Forms tutorial.
Did this resource help you do something awesome with Gravity Forms? Then you'll absolutely love Gravity Perks; a suite of 32+ essential add-ons for Gravity Forms with support you can count on.
I’m having trouble getting this to work as well. It’s not automatically hiding the field and it doesn’t seem like it’s actually selecting any of the options either. I’m trying to sequentially assign 1 of 3 products on each submission, so I’m pretty sure this snippet is exactly what I’m looking for, but I can’t seem to figure it out.
Here is the full functions.php file: https://snippi.com/s/as2mdcz
Hi Kyle,
I reached out directly through our Support queue to dig into this one.
having trouble installing this. can anyone assist? :)
Hello Matthew, what kind of issue are you having? Please check out our Snippet Troubleshooting section to see if these tips help you out.