Home › Forums › General Issues › Post creator/retriever? › Reply To: Post creator/retriever?
I would use a select field for the location select and dynamically populate it from the CPT values. That would also let you have a “New Location” value and have conditional fields if they’re needed.
I have some examples of populating fields based on other fields with custom AJAX requests here https://github.com/Hube2/acf-dynamic-ajax-select-example. They are only basic examples.
For the last one, you could create an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/ for this form. Test to see if the value is “New” and if it is then create the new location post based on the input and update the location field with the ID of the new post.
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.