Actually what is happening is I am creating a new value to save that I think gets saved but then the $_POST['acf']
writes over it with the Post value.
So I think I need way to save the new data and save/update the values after the $_POST['acf']
Does that make more sense.
I was hoping to do this here as I have all the data that I need here.
Anybody have any ideas or where I can look
I found how to do this with jquery
jQuery(document).ready(function($) {
var strNewString = $('#FIELDID').html().replace(/\Select taxonomy/g,'NEW TEXT');
$('#FIELDID').html(strNewString);
});
Replace the #FIELDID with the field id this is in #acf-field_#####
Replace the NEW TEXT with the text you want to show
I have a custom scrip page but you could add it inside script tags on the page that is loading the form.
I hope this helps someone as I was searching all the wrong places for this.
Hi, Did you ever figure this out. I think I want the same thing.
I have two taxonomies I want them to choose from which but i want to change the wording of the option “select taxonomy” because on a front end form people don’t understand what taxonomy.
I have tried a couple of things
add_filter(‘the_content’, ‘s4f_acf_prepare_taxonomy’); with the function replacing the text but it did not work.
I think it might have to do with a filter similar to this
add_filter('acf/prepare_field/name=_post_title', 's4f_acf_prepare_title');
function s4f_acf_prepare_title( $field ) {
$field['label'] = "Goal Name";
if ( $field ) {
return $field;
} else {
exit;
}
I will be back to this and will post if I find a solution
That was great, Thank you very much.
For others, change the taxonomy to the cpt category if needed, and add a comma after the ‘field’ => ‘term_id’ in the array statements and of course change the category id to what you want.
T
Anybody?
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.