Skip Navigation

[Resolved] Displaying value from a Repeatable Field Group in a View listings

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

Problem:

I have a post type - "Referrals", and a Post Type "Attorneys". Within Attorney's Custom Fields, I have an RFG "Attorney Communication Settings".

I would like to show the a field from the Attorney Communication Settings.

Solution:

It require nested views. For example:

https://toolset.com/forums/topic/displaying-value-from-a-repeatable-field-group-in-a-view-listings/#post-1551949

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

This support ticket is created 4 years, 10 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Mukesh 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1551755

Tell us what you are trying to do?
I have a post type - "Referrals", and a Post Type "Attorneys". Within Attorney's Custom Fields, I have an RFG "Attorney Communication Settings". I also have a View where I show all Referrals in a Tabular Format. I would like to show the a field from the Attorney Communication Settings , e.g. Fax Number in this View where I show Referrals. What is the best way to do that. I tried the tutorials for displaying RFG, but that seems to be focused on showing a Detailed Page where a single Post is being shown. I have a View that is showing a list of Posts (Referrals) and want to show the RFG that is of another Post Type Attorney which has a one-many relationship with Referral. I can't find any other documentation on such method. Let me know if my explanation needs further clarification.

Is there any documentation that you are following?
No, But I am thinking I would use a [types field='...'][/types] short code or types render field API using a special Item Attribute or something similar to try to achieve this.
Is there a similar example that we can see?

What is the link to your site?

#1551949

Hello,

How do you setup the post type relationship between "Referrals" and "Attorneys"?
One-to-many between "Referrals" and "Attorneys"?
Or One-to-many between "Attorneys" and "Referrals"

I assume it is:
One-to-many between "Referrals" and "Attorneys"

And in a WordPress page, you are going to setup a post view to display "Referrals" posts list, each "Referrals" item display related "Attorneys" posts informations.

If it is, it require nested views. For example:
1) Grand parent post view:
- Query "Referrals" posts,
- In view's loop, display below parent post view

2) Parent post view:
- Query "Attorneys" posts
- Filter by post type relationship between "Referrals" and "Attorneys"
- In view's loop, display below child post view

3) Child post view:
- Query RFG "Attorney Communication Settings" posts
- Filter by post type relationship filter: RFG "Attorney Communication Settings"
- In view's loop, display custom fields of RFG "Attorney Communication Settings"

More help:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

#1555569

My issue is resolved now. Thank you!