Support

Account

Home Forums General Issues css with radio button

Helping

css with radio button

  • Hi,
    I’ve got a very simple question but I can’t deal with it at the moment. I’ve got a radio button field and I want to retrieve the value to set a css class. Let’s say the field is named Colors, with 2 options :

    • bleu_outremer : Bleu outremer
    • rouge_carmin : Rouge carmin

    Based on https://www.advancedcustomfields.com/resources/radio-button/ under “Display value and label”, I inserted it in the code of the page, but span class=”color-<?php echo $value; ?”> only displays span class=”color-Array”>.
    Sure I’m missing something, but what ?
    (Actually, the label doesn’t display either)

  • Hi Tomoe,

    Did you try to change the return value for this field (value, label, both(array)) in the field settings?
    It looks like you set the return value to an array, but you’re trying to return a value.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘css with radio button’ is closed to new replies.