Home › Forums › Feature Requests › Filter default values › Reply To: Filter default values
this is an old question, and I’m not sure when this was added, but the default values for every field can be set using and acf/load_field filter https://www.advancedcustomfields.com/resources/acfload_field/. The example on this page shows choices, but any field setting can be altered this way, although changing important values like key will cause you problems. To see the settings of any field just output them and you’ll be able to see what you can change.
function my_load_field_filter($field) {
echo '<pre>'; print_r($field); echo '</pre>';
return $field;
}
Hope that helps anyone that’s looking for this type of thing.
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.