Hi,
i dont know if i asked it like this:
it is possible to sort parent view about datefield in rpg that comes from view?
i created a slider with some Dates as repeatableGroup fields with date in it. Now i would have the order about the next date.
thx for helping
best regards - alex
Hello,
Toolset repeatable field group is based on one-to-many relationship, so each item of repeatable field group is also a post, the post type slug is same as repeatable field group slug.
And Toolset Views/Blocks plugin is using WordPress class WP_Query to query posts, you can order the result by custom fields of current post type, you can not order the result by another post type's fields:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query
So it is not possible with Toolset plugins, you might consider to move the custom date field from repeatable field group into the post
hi, thx for the answer. But is it possible to copy a field from rpf to an field in parent when i save it? Then i can sort it.. - Or a workaround for this?
best regards - alex
Unfortunately, there isn't such kind of built-in feature within Toolset plugins, one post can have multiple instance items in repeatable field group, so it won't be easy to move an RFG field into parent post, you might need to move it manually.
hey - yes i recognize that toolset dont have a build-in-feature for that. But iam searching for a method to do this. If i find a snippet like something to update the Parent post on save - perhaps this way is good: https://developer.wordpress.org/reference/hooks/save_post/
You dont know a snippet for something?
best regards - alex