Home › Forums › Feature Requests › How to change default settings of fields
Hi there !
– Say anytime i want an image field, i need it to output an array as default.
– Or anytime i use a wysiwyg, i don’t want it to show the media button
– when i need a textarea, i want it with no formatting as default.
How can i change these defaults ?
Any plugins or snippet example for functions.php ?
Thank you !!
Johan
Hi @jdelforge
You can always use the acf/prepare_field hook to do it. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/acfprepare_field/.
I hope this helps 🙂
Thank you James,
Here is a very interesting answer i just got from Stackoverflow:
http://stackoverflow.com/questions/37717888/acfs-how-to-change-default-values-settings
Greetz!
James, as Pierre told me :
“An important point : this snippets will do the job for the display (of the value for the front, and on the field for the back), but they will not check/select the correct option on the ACF fields settings form.”
Do you think another way of approaching it is possible ?
… i think it would be a great feature to add, thou… great to match anyone’s method.
Hi @jdelforge
If you want to change the default settings on the field group editor, I’m afraid you need to modify the core files. I’m sorry for the inconvenience.
Thanks 🙂
OK Thank you James.
I have got some tips to use another hook : acf/update_field/
For anyone interested, the answer is updated at
http://stackoverflow.com/questions/37717888/acfs-how-to-change-default-values-settings
It is not perfect, but it will work for me.
Greetz
Hello, is there any update for this in 2023 and ACF Pro v6 ?
It would make life much easier, if there was option to change default field settings.
The topic ‘How to change default settings of fields’ is closed to new replies.
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.