Home › Forums › Front-end Issues › Frontend Form Titles › Reply To: Frontend Form Titles
I can explain the issue you are having.
ACF saves values on the save_post hook. ACF’s acf/save_post hooks runs at a priority of 10. What this means is that your action
add_action('save_post', 'my_cpt_title_update', 10, 3);
is running before acf has saved the values. You might think that this is working in the admin but what should be happening is that you’re updating the title with the old value of the field and not the new value if it’s being changed.
It’s not working at all on the front end because there is not “old” value as it’s a new post. Your action is running before ACF has saved it.
You can try increasing the priority of your action to something >10, but I’m not sure that will work.
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.