ACF Repeater Fields

In ACF (Advanced Custom Fields) Pro version, the plugin provides us with a dynamic data field called the Repeater Field. The Repeater Field is one of the most powerful fields available in ACF. It is one of the key reasons to upgrade from the free version of ACF to the pro version, as repeaters are not available in the free version of ACF. Repeaters give us a convenient and rapid way of storing repeating sets of data. As an example suppose your building out a recipe site. You have a custom post type for storing recipes, and now you need to figure out how to store your ingredients. Because each recipe going to have multiple ingredients, a repeater field might be the best choice. With a repeater field you can then create a set of child fields for the repeater that include the name of the ingredient, the quantity and the measurement unit.

The Repeater Field type is found under the “Layout” fields near the bottom of the field type list.

Once you set the field to repeater, you’ll get this section shown below for adding your subfields… we often call these “child fields” as this creates a parent and child relationship between the repeater field and it’s subfields.

Having now added 3 subfields to the repeater we can try it out in action. This is the “table” layout for a repeater field, which works well when you have just a small number of fields. The repeater field also supports “Block” and “Row” layouts.

For reference you can find the official resource page from the makers of ACF at ACF | Repeater (advancedcustomfields.com)