Skip Navigation

[Resolved] Repeating Field block doesn’t display any Custom Field options

This thread is resolved. Here is a description of the problem and solution.

Problem: I am not able to find any fields from my Repeatable Field Group (RFG) when I try to select a dynamic source for a Block.

Solution: If you want to loop over RFGs, you'll need to use a View. Some blocks are designed to work with fields that allow multiple values, but not individual fields in an RFG. The type of block you are trying to insert will determine which type of "repeating" field is allowed for dynamic sources.

0% of people find this useful.

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1935829
Repeatable Block Issue 3.png
Repeatable Block Issue 2.png
Repeatable Block Issue 1.png

I added a new Repeatable Field Block to a Custom Post Type today, but when I go into the Block Editor to add this field, it is saying there are no repeatable fields to select from. I created a new post to make sure it wasn't just an issue with existing posts, but the repeatable field isn't showing up. Attached are images showing how the Repeatable Field is setup, showing the values for the selected Post, and then showing what happens when I try to add a Repeatable Field block.

#1936981

Hi, the terminology here can be confusing because there are two concepts involving repeating fields of some kind. Let's quickly review those so we are on the same page.

1. Repeatable Field Groups (RFGs) are repeatable groups of fields, as you've shown in your screenshots here. Each "row" of an RFG may contain values in these custom fields, grouped together in a single entry.

2. Individual custom fields can be set to allow multiple values. For example, an image field that allows Users to upload multiple images to the same custom field. This isn't a repeatable group like an RFG, because you cannot group an individual image from this field with another custom field value in a single entry. It is a single field that allows multiple values, unrelated to other custom fields that allow multiple values. Sometimes these fields that allow multiple values are referred to as repeating fields, and this can be confused with RFGs. I would prefer to refer to these as custom fields that allow multiple values, for clarity.

The differences between these two concepts are important when you're trying to implement these fields in the Block Editor. For example, a Slider block in the Block Editor is designed to work with a custom image field that allows multiple values, not an RFG containing an image field.

On the other hand, Views are not designed to loop over the multiple images uploaded in a single custom image field that allows multiple values. A View is designed to loop over posts or RFGs, but not individual fields that allow multiple values. Imagine you have a post that contains an RFG with several rows of entries. When you display that post on the front-end of the site, you want to display all the images from an image field in that RFG. In this case, you need to create a View of that RFG and insert the image field in the loop of that View. Then insert this View of the RFG in the Content Template assigned to this post, to see a list of all the images from all the RFGs associated with that post.

I hope this helps clarify. If you need more guidance, please explain more about what you want to achieve. What type of block is this in your screenshot? Where are you trying to display this content? I see an RFG that contains two text fields, and a few details of a block in the block editor screen. I'm not able to see how this block is implemented, or the context of the block, but it looks like you have selected the Review Summary custom field group - that is not the same as the Review Specs RFG. That is a different field group, which might be why you don't see your text fields appear here, but it's hard to say for sure without knowing more about the block and its context. If you're trying to display one of the text fields from the RFG, you should create a View of this RFG. Then you can insert the text fields in the loop of that View using the Single Field block.

#1937051

So the structure of this is: I have a review custom post type. A product that's being reviewed might have different specs (size, weight, price, etc..) that vary from product to product. So for each review I want to be able to enter all the relevant specs for that product. Then in the Content Template I use to display a review, I want to have a Reusuable Block that builds a Specs table, using the Repeatable Field Group to do so.

Do I need to build a View for this first, and then import that view into a reusuable block for the content template? Before I did different review types, which each had their own custom specs fields, but that got overly complex when I wanted to update the look so I'm trying to simplify to a repeatable field group for everything and then have it displayed by a reusuable block so it's easy to update the output in the future.

Thanks!

#1937071
Screen Shot 2021-02-07 at 3.02.38 PM.png

If you want to loop over an RFG to display some results, you'll definitely need a View. I'm not sure if a reusable block is needed or not based on the information I have so far, but if other fields and blocks are involved aside from the View block, a reusable block might be appropriate. If a reusable block is necessary, I would build the entire design including the View block and other blocks inside a Container block, then convert the entire Container block to a reusable block using the Container Block options menu (screenshot attached).

#1939653

Thanks. I tested this out on my staging server and it works so now I'll finish getting it correct there and move it over to production this week!