Home › Forums › Front-end Issues › Tag field with auto-creation of new tags › Reply To: Tag field with auto-creation of new tags
I suppose that most people find the existing field enough.
As far as adding this to ACF, you’d need to ask the developer https://www.advancedcustomfields.com/contact/
Here’s another option because most of the issue stems from needing to click on the + link when hovering over the field. Add an acf/render_field filter https://www.advancedcustomfields.com/resources/acf-render_field/. This solution depends on JQuery being loaded, which it should be.
// replace field_XXXX with your field key
add_filter('acf/render_field/key=field_XXXX', 'add_term_add_link', 20, 1);
function add_term_add_link($field) {
?>
<a href="javascript: $('[data_key="field_XXXX"] .acf-input [data-name="add"]').trigger('click');">Add a Category</a>
<?php
}
What this does is to add a link below the field that when clicked will trigger the same action as clicking on the +. You can then style it as a button or whatever makes the most sense.
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.