Skip Navigation

[Resolved] not getting group repeater values in json rest api.

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)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 1 year, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2692643

I am using rest api for json reponse , in my json response group repeater values are not coming the field "toolset-meta" is empty. Please have a look.
hidden link

#2692765

Hi,

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

The custom fields inside the 'repeater field groups' are not directly stored with the custom post types they are registered for. When a repeater field group is created a hidden custom post type with the same slug as the repeatable field group is also registered.

Every repeatable field group entry, is stored as an individual post in that hidden post type and holds a one-to-many relationship with the parent post, where the repeatable field group is created.

The custom field values inside that repeatable field group entry are stored with that hidden child post and not with the actual parent one.

And because the Toolset's REST API integration only covers the custom fields directly attached to a post, the customer fields that are part of any repeatable field group are not covered.
( ref: https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/ )

You can extend the WordPress REST API and query the repeatable field group data using the Toolset Relationship API:
- https://developer.wordpress.org/rest-api/
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

regards,
Waqar