Support

Account

Home Forums ACF PRO How to get repeater data to be used as a select? Reply To: How to get repeater data to be used as a select?

  • The filters you are trying to use modify the choices of fields in the admin. They will not create a select field for you.

    
    if (have_rows('your-repeater')) {
      ?>
        <select>
          <?php 
            while (have_rows('your-repeater')) {
              the_row();
              ?><option value="<?php the_sub_field('your-sub-field'); ?>"><?php the_sub_field('your-sub-field'); ?></option><?php 
            }
          ?>
        </select>
      <?php 
    }