Home › Forums › Add-ons › Flexible Content Field › True / False in Flexible Content › Reply To: True / False in Flexible Content
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
}
}
}
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.