Support

Account

Home Forums Add-ons Flexible Content Field True / False in Flexible Content

Helping

True / False in Flexible Content

  • How do you reference a True / False field from a section of a Flexible Content field?

    I’m attempting to display a div outside a section inside my Flexible Content section if a True / False field is checked with in.

  • You’re explanation of what you are trying to do is not clear for me to understand, but basically you can’t reference a field in a row outside of the loop.

    
    if (have_rows('flex-field')) {
      while('have_rows('flex-field')) {
        the_row();
        if (get_sub_field('true-false-field')) {
          // do something
        }
      }
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘True / False in Flexible Content’ is closed to new replies.