Home › Forums › General Issues › Radio groups should not have an option checked by default › Reply To: Radio groups should not have an option checked by default
I’m really sorry that my answer makes you feel that way. I just want to make sure that my answer can be followed easily, even for a new user.
As John said before, most of the time users want one of radio buttons to be selected because that’s how it supposed to be. It’s not a rule, but it’s just how it works most of the time. If you think this is not how it supposed to be, you can always open a new ticket on the following link to fill a bug report or feature request: https://support.advancedcustomfields.com/new-ticket.
In the meantime, you I believe you can use jQuery to modify the “checked” attribute (this would be for advanced users). You can use the acf/input/admin_head hook to add the script. In that hook, you can check if the field has a value or not and then remove the “checked” attribute if it doesn’t have a value yet.
I hope this makes sense 🙂
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!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.