Home › Forums › Gutenberg › Inserter Help Panel › Reply To: Inserter Help Panel
I believe what you are looking for is the attribute “example” I haven’t tested this, but hopefully this gets you on the right track. Let me know how you go.
From this page: https://www.advancedcustomfields.com/resources/acf_register_block_type/
It mentions
$settings
(array) (Required) Array of arguments for registering a block type. Any argument from the JavaScript registerBlockType() function may also be used.
Looking at the Gutenberg Docs:
https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#example-optional
So for example if you have a block with a Title and Description fields you add them into an attributes array:
acf_register_block(array(
'name' => 'testBlock',
'title' => 'Test Block',
'description' => 'A Test block which should hopefully show an example in the help panel',
'render_callback' => 'testBlockRender',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array( 'Test' ),
'example' => array(
'attributes' => array(
'title' => 'Title',
'descrpition' => 'A Description',
),
),
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.