Home › Forums › Backend Issues (wp-admin) › Updating taxonomy fields › Reply To: Updating taxonomy fields
I may have found somehting :
in wp-admin\include\meta-boxes.php, search <p> markup with the class
class="category-add wp-hidden-child"
on <input type="button"
add a onclick :
<input type="button" onclick="refresh_taxonomy_field_<?php echo $taxonomy; ?>();"
after this, add a JS :
<?php
echo '<script type="text/javascript">
function refresh_taxonomy_field_'.$taxonomy.'() {
var new_val = document.getElementById("new'.$taxonomy.'").value;
var acf_field = document.getElementById("acf-field-'.$taxonomy.'");
var opt = document.createElement("option");
opt.value = new_val;
opt.innerHTML = new_val;
acf_field.appendChild(opt);
}
</script>';?>
not very clean, but it works !
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.