Home › Forums › Gutenberg › ACF Blocks Preview with Block.json and register_block_type() (WP 6.0 and after) › Reply To: ACF Blocks Preview with Block.json and register_block_type() (WP 6.0 and after)
Hi! You can set default values for ACF in several ways:
This can be useful in simpler cases — just set default values for the fields directly in the ACF field settings.
In the block.json settings, you can add default values using the field_key. You can even set values for repeater fields by preserving the structure. For example, if you have a Relationship or Object field that returns post IDs, you can simply list the post IDs as default values.
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.