Home › Forums › ACF PRO › Set radio button to selected › Reply To: Set radio button to selected
If I understand correctly your field has 2 options
1) red
2) blue
If you update the field with the value checked, to which value should it apply ?
You haven’t provided a real value which should be stored, only a string which does not occur in your options.
And… checked is only used by checkboxes (afaik).
In this case you would have to actually set the value of what you want to save.
So you would have to save red or blue (assuming those are both the id and value).
So I think you would have to do something along the line of:
update_field('field_1234567890', 'red' );
update_field('field_1234567890', 'blue' );
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.