Home › Forums › Front-end Issues › understanding acf_form › Reply To: understanding acf_form
– First of all, WHY I have to do all this, just because I use taxonomy? Why don’t you better integrate taxonomy in ACF(Pro)?
Because ACF has some limitations, an these limitations are directly related to limitation in WP. ACF does not change the way WP works (even if it looks like it does) it only enhances what WP can already do and what is possible for anyone to do using core WP function if they wanted to do all the work themselves.
– You said
You also mentioned trying to create a field group that was conditional based on a field in another field group, also not possible, either front or back end
but it works for me on backend (not in front).
– …and I still don’t understand why I have to specify ‘field_groups’ for acf_form. What’s the aim of location rules if it doesn’t work ?
The reason that you need to do this is because you want to create new posts. If you wanted to show the current values of the current post or page and allow someone to update those values then yes, the location rules will work. But since your intention is to create a new post in a different post type than the post where the form is shown on the front end, setting the location of the field group to appear on both you template page where you want the form and on the post type where you want to create the new post, is pointless.
you use wp_set_post_terms and it works whereas codex said “For a taxonomy on a custom post type use wp_set_object_terms()
A post is a post is a post, even a post in a custom post type is just another post that has all of the same properties. Anything that works on the ‘post’ post type will work on a post in a custom post type.
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.