Where you will replace _wpcf_belongs_projekte_id with _wpcf_belongs_{yourcptslug}_id
This support ticket is created vor 6 Jahre, 1 Monat. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to:
show repeating fields in view from parent cpt if exist.
i have a parent "projekt" with repeating child fieldset/cpt "pdownloads". In Child "objekt" of parent "projekt" i want to show the "pdownloads" of the same parent "projekt".
How can i do this? My way: i created a view (screenshot)
Actually what you can do to check if the child has a parent is to use our conditional shortcode.
[wpv-conditional if="( '[wpv-post-field name='_wpcf_belongs_job_id']' ne '' )"]
repeatable fields
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-field name='_wpcf_belongs_job_id']' eq '' )"]
some other content
[/wpv-conditional]
From the example above you see that i have the slug _wpcf_belongs_job_id , this references the custom field that the parent information is stored. Now in your case you will use "_wpcf_belongs_{parent-cpt_slug}_id" where you will replace the {parent-cpt_slug} with the slug of your CPT.
Ahh yes I didn't what I did was to add a filter to the view for the parent projekt , since the objekte and the pdownloads share the same parent cpt, so essentially pdownloads and objekte are siblings. So if I found the parent of the current objekte that i'm viewing then I can use that parent information to find the pdownload.
I did that by adding this filter. See Screenshot
Then I filtered the view using the shortcode parameter.