Hi guys,
Can’t field any information on how to update field that have options (radio buttons).
I’m trying to use this:
$field[‘option’][$company_newsletter] = $company_newsletter;
update_field(‘field_55e07b8c324a5’, $field, $acf_user_id);
$company_newsletter value can be ‘yes’ or ‘no’. I make sure that the option value is the same on both front and back end.
Hi @nunolegendary
I’m not sure what you’re trying to do?
You have a variable $company_newsletter that is either yes or no (as a string) and you want to update an ACF field with this value?
It seems like what you want to do is:
update_field('field_55e07b8c324a5', $company_newsletter, $acf_user_id);
It works! I was sure that I already try the way you did, but for some reason it didn’t work.
Thanks for the help.
Hi @nunolegendary
Great to hear!
Sometimes we trip up on the simplest things and just need a fresh pair of eyes 🙂
Feel free to post in the forums if you have further issues with ACF.