Home › Forums › Front-end Issues › Fontend form radio button default to none › Reply To: Fontend form radio button default to none
in fields/radio.php I’m seeing this bit of code at line 114-119
// select first choice if value is not a valid choice
if( !isset($field['choices'][ $field['value'] ]) ) {
$field['value'] = key($field['choices']);
}
This seems to be where the first option is set by default – can anyone tell me why there might be a good reason to NOT delete these lines (other than editing core plugin files). What purpose does this bit of code have?
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.