Skip Navigation

[Resolved] Get meta data from Groups of Repeating Fields

This support ticket is created 6 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
- 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 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#910872

Tell us what you are trying to do?

I have some groups repeater, I put the information and does not show when I bring the all the information from the post.

$all_meta = var_dump( get_post_meta( get_the_ID() ) );

I need to access each information from the repeater.

I found in your website you have a method to render, //types_render_field("custom-field-slug-name", array("argument1″=>"value1″,"argument2″=>"value2″,"argument2″=>"value2"));

But I need to bring the information and work with the custom field.

Other thing Is there any possibility to make conditional for the repearter groups?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#910915

Hello,

The Repeating Field groups is based on post type, so you can get it using Views plugin with post type relationship filter:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups

Same as above, you can use Types new API functiontoolset_get_related_posts () to get the related posts of repeating field group:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts

and render each post's custom field:
https://toolset.com/documentation/customizing-sites-using-php/functions/

#911146
toolset_repeater_problem_db.png
toolset_repeater_problem.png

Hi, I think you did not undertand me. I need to get the the information from this repeater.

I could bring from the database but I can not find, where toolset save this information. Should be in the wp_postmeta but is not there.

All other fields are in the database (send print) how can I get this data?

Thanks

#911626

As I mentioned above, the Repeating Field groups is based on post type, each instance of Field group is a single post, for example:

1) You need to get the related posts first, you can use Types new API functiontoolset_get_related_posts () to get the related posts of repeating field group:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts
You will be able to get the related post IDs

2) Then use post ID to get the post meta value, render each post's custom field with Types function types_render_field():
https://toolset.com/documentation/customizing-sites-using-php/functions/

More help:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups

See screenshot:
hidden link