I want to create a front-end form that allows users to add/edit terms in a custom taxonomy. Is this possible? I’ve looked through the docs of acf_form()
and acf_register_form()
but there doesn’t appear to be any support for taxonomy terms at all. Cheers.
The first step with creating a front end form to allow users to edit a term would be supplying the correct post ID when calling acf_form().
For an existing term the post ID you need will be "term_{$term_id}"
For allowing them to create a new term you would need to build a pre_save_post filter that creates the term and sets the correct post ID to be returned to ACF so that it can to the updating https://www.advancedcustomfields.com/resources/acf-pre_save_post/. In this case you would use something like "new_{$taxonomy)_term"
for the post ID and use this in your conditional at the beginning of your filter.