Home › Forums › Backend Issues (wp-admin) › Pre-populate ACF default value with post title › Reply To: Pre-populate ACF default value with post title
You would create an acf/load_field filter https://www.advancedcustomfields.com/resources/acf-load_field/ and in this filter set the default value to what you want.
But this will really not work. This issue would be that on a new post, there is no title, so the default value would be not be populated with anything useful.
If what you’re looking for is to set this field with the post title when the post is saved then you should look at creating an acf/save-post filter https://www.advancedcustomfields.com/resources/acf-save_post/. In this filter you could get the title of the post and update the field with it https://www.advancedcustomfields.com/resources/update_field/
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.