Home › Forums › General Issues › acf_form how to create two forms › Reply To: acf_form how to create two forms
Yes.
The acf_form function allows you to define some custom HTML. Please see the docs to read more on this.
I would add some custom HTML as a hidden input with a name of ‘my_post_type’. Please don’t use ‘post_type’ – this will conflict with WP.
Then in your acf/pre_save_post filter, you can create a new post and use the ‘my_post_type’ value in the $_POST to set the post type.
Hope that helps.
Thanks
E
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.