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
}
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.