Home › Forums › Add-ons › Repeater Field › Display tables 1/2 or 1/3 screen using repeater and get_row_index › Reply To: Display tables 1/2 or 1/3 screen using repeater and get_row_index
Hi @arctica112
I’m not fully understanding what you’re after – and this forum is really for this sort of topic (this is more of a general PHP question) BUT I think you just need to do something like this:
$amount = count(get_sub_field('table_forms')
this will give you the total number of items in your repeater. Then you can check that number to determine how many columns you’ll be needing.
Phil
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.