If there is one feature missing from Gravity Forms, that is a field repeater section. A way to set a starting and ending point and adding fields inside a repeater. Turns out this functionality exists in Gravity Forms, but in a beta state.
If you search for existing plugins, you’ll probably find not more than a handful of plugins, all either paid or part of a larger/bundle plugin, probably not worth investing in.
? Hey! Did you see my Gravity Forms Date/Time Picker plugin?
I needed a repeater for a client project and I needed it to work with the latest release of Gravity Forms, 2.5
. A great release with an overhauled UI. Still, the repeater functionality is not there.
As I had one week to implement his functionality, I started my coding adventure. Based on several tutorials, some code snippets and an old WordPress plugin, I cobbled together a fully working* plugin.
* For my specific scenario.
As seen in the screenshots above, I have styled the repeater fields differently, in order to make them stand out. For a long and complex form, it might get confusing pretty quickly.
.gform_wrapper.gravity-theme div.gf_repeater2_child_field,
.gform_wrapper.gravity-theme fieldset.gf_repeater2_child_field {
margin: 0 64px;
padding: 16px 64px;
border-left: 3px solid #ff002b;
background-color: rgba(0, 0, 0, 0.05);
}
Supported Repeater Fields
- Address
- Checkboxes
- Date
- Drop Down
- Hidden
- HTML
- MultiSelect
- Name
- Number
- Paragraph Text
- Phone
- Radio
- Section
- Single Line Text
- Time
- Website
Repeater Features
- Repeat groups of fields multiple times
- Use multiple repeaters on the same form
- Use shortcodes to display data to the user
- Use JavaScript to manipulate the repeater
- Customize the add and remove button’s HTML
- Use Gravity Forms pre-populate hooks and filters like normal
- Supports conditional logic
All contributions are welcome, especially for testing for conflicts with other plugins.