Tell us what you are trying to do?
I have a parent post type called "campus" and a child post type called "rooms". I have a repeatable image field in the child posts where I show a gallery for a that specific room. I would like to have a master gallery where I show all of the images from all of the rooms (child posts) on the main campus page (parent post).
Is it possible to create this master gallery from repeatable image fields from the child posts?
Or something that would work even better for me... Is there a way to have a repeatable image upload field in a cred form, and a new child post is created for each uploaded image with each of the images being the featured image for each post?
Hello,
For the question:
Is there a way to have a repeatable image upload field in a cred form, and a new child post is created for each uploaded image with each of the images being the featured image for each post?
There isn't such kind of built-in feature within Toolset plugins, you might consider custom codes, for example:
1) After user fill and submit the post forms, use action hook cred_save_data to trigger a custom PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
2) In this PHP function, get the repeating image field values:
https://developer.wordpress.org/reference/functions/get_post_meta/
use those values to create different room posts:
https://developer.wordpress.org/reference/functions/wp_insert_post/
Setup post relationships between "campus" and "Room"
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
And setup the room posts feature image:
https://developer.wordpress.org/reference/functions/set_post_thumbnail/
It's good to know it might be possible.
I am not proficient with this type of coding, but I will see what I can do. Thank you for your guidance.
If you need more assistance for it, please provide a test site with the same problem, I can setup a demo in it
Since you are using Gravity Forms to create the "Contributions" post, it is out the range of Toolset supports, we don't provide support for other plugins, you might contact Gravity Forms for it
If you need Toolset supports, please point out the problem and page URLs and Toolset post form URL.
Makes sense. Appreciate it.