Home › Forums › General Issues › Hypothetical : How can I add values from a field in a repeater? › Reply To: Hypothetical : How can I add values from a field in a repeater?
You need to do one of a few things.
The first is loop though the field twice.
If you use get_field('progress_barRepeater')
this will return the entire acf field as a nested array, you could then loop though the rows of the array to get the values and then you can loop through them again to display each row.
You can capture the output of a single loop using an object buffer, creating html and collecting the information all at the same time. Then after the loop output the “average” and then the content of the object buffer.
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.