Home › Forums › Feature Requests › Stylized UI for Radio Button with only two options › Reply To: Stylized UI for Radio Button with only two options
Personally I would just use the true false field because this
$value = 'dark'; // default 0/false value
if (get_field('field_name')) {
$value = 'light'; // 1/true value
}
Is much easier than creating a new field type.
You could also add new field settings to the existing true false field https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/ and then add a filter as well to the format field hook. Then you could set the return values when creating the field and return the values you want.
Just some more ideas for achieving what your looking for.
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.