Fieldsets
Fieldsets allow you to repeat a group of fields as many times as needed. They can be added to any content type that supports custom fields, including post types like listings, reviews, and claims, as well as taxonomies and user profiles.
If you are familiar with the Repeater field in the Advanced Custom Fields plugin, fieldsets work in a very similar way.
Creating fieldsets
Here is how you can add a fieldset to listings in your directory.
Click Directories in the admin sidebar.
Under the All Directories tab, click the gear icon in the row of the directory that you wish to configure.
Under the Content Types tab, click the dropdown button in the Listing row and then click Manage Fields.
Click the green Add Element button with a plus sign at the bottom of the page:
Click the Utility tab in the modal window, hover over to the Fieldset element and click.
Enter fieldset element details and save.
After the fieldset element is added, you can start adding fields to it. To do so, hover over the fieldset element and click the green plus sign button that appears.
Editing content containing fieldsets
Once a fieldset is defined for listings, you can add as many instances of fieldsets as needed when adding or editing a listing. You can also reorder the fieldsets by dragging them up and down, and delete them if necessary.
To add another set of fields, click the Add More button at the bottom.
Displaying fieldsets
To display a fieldest, you will need to add a display element for the fieldset to displays.
Click Directories in the admin sidebar.
Under the All Directories tab, click the gear icon in the row of the directory to edit.
In the Content Types tab, click the dropdown button in the Listing row, then select Manage Displays.
In the display editor, ensure the Detailed sub-tab is selected. Scroll to the bottom of the page and then click the green Add Element button (with a plus sign).
In the modal window, click the Field tab. Find the display element for your fieldset and click it to add it to the display. In the settings, you can configure how each fieldset is displayed on the frontend through the display element, including options for layout, sorting, and pagination.
Once the display element for your fieldset is added, you can add display elements for the fields within the fieldset to the fieldset display element.
In our example, we added all four fields defined in the fieldset to be displayed across two columns. Three fields were placed inside a Field List display element to display with labels in the first column, while one field displaying room photos was placed in the second column.
And that’s it! Now, when you visit the single listing page on the frontend, the list of fieldsets will also be displayed.
In grid layout: