Skip Navigation

[Resolved] Best way to filter through repeatable fields

This support ticket is created 3 years, 4 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2112551

Tell us what you are trying to do?
- looking for the best working way to filter view results using repeatable group fields.
For example I have a repeatable group "Education" with fields "School name" and "School City" etc. I want to be able to filter posts by "School name" and "School city".
- - as I see for now using repeatable group fields directly in the filter (query by URL parameter) is not working: no options available in a filter. One idea comes to my mind is having a separate post types instead of repeatable groups and merge them in another view with a filter. But that's sounds like to complex solution. I believe there should be another option

Is there any documentation that you are following?
- as far I search on the forum info is 1-2 + years old and I seen some comments from Toolset team that filtering by repeatable group fields was going to be implemented. One with options thread I found: https://toolset.com/forums/topic/filter-posts-by-their-repeatable-field-group-data/

Is there a similar example that we can see?
- I didn't find any

What is the link to your site?
hidden link

#2112931

Hi,

Thank you for contacting us and I'd be happy to assist.

Your observation is correct and currently, it is possible to only add a search or query filter for the fields directly added to the post type. Fields added inside the repeatable field groups are stored with a separate hidden child custom post type, so they can't be used with the search of the actual/parent post type.

As a workaround, you can use two separate search views, on the same or separate pages:

1. First for the parent post type that only offers the search fields from that post type.

2. Second for the child post type "Education" (repeatable field group), which offers the search fields for the fields in the repeatable field group. In this second view, you can show the related parent post's title instead of the current child "Education" post.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2116655

My issue is resolved now. Thank you!