I am creating a city ecommerce website which introduces lots of info about a city, and lets users submit information.
This post deals with 4 custom post types -> Events, Listings, Organizers, and Products, in which Events is the parent of the others.
I would like to allow a user to use cred to add a new event and then link listings (venue/place), organizers, and products (tickets) to the event. Here's how the workflow would work (at least in my mind and after lots of searching and reading).
Step 1. -> User Creates "Event" with Post ID = event_id
Notes:
*User is owner of event
Step 2. -> User can select from list of existing (all) OR add new "Listing" -> wpcf_belongs_event_id = eventid from step 1
Notes:
*Not sure how to display list of existing Post Titles and update their link to Parent.
*I do not want user to "own" this post. If they select it from a list, owner doesn't change. If they create new post, owner is site admin.
Step 3. -> User can select from list of existing (only ones user has created) OR add new "Organizer" -> wpcf_belongs_event_id = eventid from step 1
Notes:
*Not sure how to display list of existing Post Titles (that user has created) and update their link to Parent.
*User can own this post!
Step 4. -> User creates "Product" (a woocommerce product) -> wpcf_belongs_event_id = eventid from step 1
Notes:
*This should be a repeatable field in which user can create a couple different products, each with different prices.
*User is owner of product(s)
_________________________________________
*I realize that I could create 4 separate cred forms, one for event, and three child forms for each CPT that links to that event post id, as explained here: https://toolset.com/forums/topic/parent-created-wcred-pass-parent-id-to-child-_wpcf_belongs_parent_id-value/
But how can I let the user choose a child post that already exists OR let him/her create a new post?
**Bonus Points: How can I combine this all into one CRED form instead of 4? I saw that it is possible to do this using "insert_post", I think, but I lost the link to that.
***Bonus Points 2: Do I need to create a new form if the user wants to edit these?
Thanks!