Home › Forums › Gutenberg › Programmatically set blocks initial value › Reply To: Programmatically set blocks initial value
@chrisdark have you found out how to make this work with repeater subfields?
It seems that only top-level ACF fields appear in a template when you create a new page. Any subfields will not show in the editor – at least not initially.
I used icons_0_custom_icon to generate the first row of the repeater. icons is the name of the repeater, 0 refers to the first row and custom_icon is the name of the subfield.
It does work, just not initially. At first, the preset subfield data does not appear in the block editor. However, if you click on the block, the inspector/sidebar shows the correct data and it only appears in the editor if you make any sort of adjustment to the data in the inspector.
Wish there was a way that worked properly. :/
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.