Home Forums General Issues Checkboxes in a repeterer field


Checkboxes in a repeterer field

  • Hi!
    I’m trying to get the value from a checkbox field in a repeterer field:

    <?php if( have_rows('repeterer_field') ): ?>
        <?php while( have_rows('repeterer_field') ): the_row(); 
          // vars
          $checkbox = get_sub_field('checkbox');
          <?php if( $checkbox && in_array('test_en_lab', $checkbox) ): ?>
            <span class="lab">
              Test en lab
          <?php endif; ?>
        <?php endwhile; ?>
    <?php endif; ?>

    But I get noting in frontend.

    Any ideas?

  • Nevermind, this code just works well.
    I had an other text field with the same name. Silly me -_-

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

The topic ‘Checkboxes in a repeterer field’ is closed to new replies.