Home › Forums › Add-ons › Repeater Field › Pre-Populate Repeater Fields
I’ve set up repeater fields to display as a table, where you can “Add Row” to create a new table row. My client will be using the same 7 rows for every post, and would like a way to pre-populate the row labels without having to hit “Add Row” each time and type the labels in. Is there a way to do this?
Hello.
Try to set the “Minimum Rows”.
http://www.advancedcustomfields.com/resources/field-types/repeater/
- Minimum Rows: Set a limit on how many rows of data are required
Did this answer your question?
I have the same/similar query.
Can a repeater be pre-populated with a set of data?
I ended up creating a separate field for each row in the table. Each row was set up as a repeater with 8 fields (one for each column), and then I set the Minimum and Maximum Rows to 1. Then I just duplicated the row and relabeled them so that I had 7 total rows, pre-labeled, with 8 columns of fields.
The interface didn’t look quite as slick as my original idea of using a repeater for the rows but the client was fine with it.
Was an alternative solution for this ever found? Our client is asking for the same thing, but isn’t quite as flexible. We’re looking to create a table like the attachment below and it’s proving quite challenging.
I found this newer post about pre-populating repeaters: https://support.advancedcustomfields.com/forums/topic/pre-populated-repeater-field/
But couldn’t get it to work 🙁 But then found this solution that uses an Options Page: https://support.advancedcustomfields.com/forums/topic/dynamically-populating-repeater-fields-with-default-values/
Hope this helps someone.
The topic ‘Pre-Populate Repeater Fields’ is closed to new replies.
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.