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.