Is there a way to add a post to a parent by putting the acf form group I created in the page’s template? What I would like to do is have a form on a event page that creates a ‘person’ under the ‘registrants’ post type I created. When that ‘person’ post is created, they are added under that event post_id as a child.
Let’s say that this code is on an event-single.php page, in the new_post array can I link the newly created people post to the id of the page that the form is currently on (which is the page of a single event) and make it the people post’s parent?
Is there something already set in acf to do this? Or is there any documentation on how to mod the forms to make this connection?
How is the post parent page stored on in the people post type? Since you’re talking about a post type being a child of another post type, is there another plugin that creates this relationship? You’ll need to know how this is stored and how to updated it or set it.
Also, what version of ACF are you using?
With this information I may be able to help you figure out a way to do this.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users