Home Forums General Issues Quick question on Radio Button choices syntax


Quick question on Radio Button choices syntax

  • I hope this isn’t a silly question, but I couldn’t find an example in the docs. I have a field type of Radio Button with 9 choices. For Return Value I have “Both (Array)” selected. The help text for Choices says this:

    Enter each choice on a new line.
    For more control, you may specify both a value and label like this:
    red : Red

    This is what I have entered for my choices:

    general_product : General Product
    freestanding_wood_stove : Freestanding Wood Stove
    freestanding_gas_stove : Freestanding Gas Stove
    freestanding_pellet_stove : Freestanding Pellet Stove
    fireplace_wood : Fireplace – Wood
    fireplace_gas : Fireplace – Gas
    wood_insert : Wood Insert
    gas_insert : Gas Insert
    hot_tub_spa : Hot Tub/Spa

    Does the label text need anything, like escaping or quotation marks, for labels that contain spaces or dashes?

  • No. ACF automatically deals with this.

  • That’s great, thank you!

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

The topic ‘Quick question on Radio Button choices syntax’ is closed to new replies.