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 not sure what you mean about not being able to replicate the issue. If you add a radio field, the first option will be checked – that’s the problem.
The true/false solution doesn’t work because if you make it required it does not validate if left unchecked. Even if it did validate, it would be unreliable because it does not force the user to make a choice – they could leave it unchecked by accident.
Using checkboxes instead of radios does not work because the user can check both ‘yes’ and ‘no’.
There is one, elegant solution for the problem: Only make one of the radios checked if it explicitly set as the default. There is absolutely no reason to have the first one checked otherwise.
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!