Sure. The easiest way to do this is to use the ACF filter called acf/load_value.
You will find docs for this on the documentation page. Use it to hook into any value loaded for the repeater field.
If the value is empty, this means that the post must be a new one, in this case, you can modify the value to trick ACF into rendering 3 rows of data.
All you need to do is set the value to this format:
$value = array( array( 'field_123' = 'Placeholder Title', 'field_456' = 'Placeholder text here...' ), array( 'field_123' = 'Another Placeholder Title', 'field_456' = 'Different Placeholder text here...' ), array( 'field_123' = 'Yet Another Placeholder Title', 'field_456' = 'Another Different Placeholder text here...' ) );
When editing the field group, you can toggle on ‘show field keys’ via the screen options menu tab. This will give you the sub field keys for field_123 and field_456.
Hope that helps.
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 29, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.