Support

Account

Home Forums General Issues How to conditionally display some html dependent upon the specific value

Solving

How to conditionally display some html dependent upon the specific value

  • I have a ‘select’ field type with 2 option (yes or no). What is the conditional code I would use if i wanted to display a different piece of html dependent on the field’s value. For example…

    If the option selected is “yes” then display “ABCDEFGHIJ”
    or if the option is “no” then display “qwertyui”
    else display “12345566”

    Thanks heaps.

    Pete

  • Hi Pete,

    Check out the ACF Resources page on creating and using Select inputs – its examples are very close to your question.

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

The topic ‘How to conditionally display some html dependent upon the specific value’ is closed to new replies.