I found a bug and fix it.
YOu are not able to use underscore in block name when you set locations for acf_add_local_field_group
Instead just replace all underscore with simple score and it will work.
acf_register_block( [
‘name’ => ‘test_any’,
‘title’ => ‘Test’,
‘render_callback’ => function() {
?>
<h2>123</h2>
<?php
}
] );
acf_add_local_field_group(array(
‘key’ => ‘block_test’,
‘title’ => ‘Block Test’,
‘active’ => 1,
‘fields’ => array (
array (
‘key’ => ‘field_1’,
‘label’ => ‘Sub Title’,
‘name’ => ‘sub_title’,
‘type’ => ‘text’,
)
),
‘location’ => array (
array (
array (
‘param’ => ‘block’,
‘operator’ => ‘==’,
‘value’ => ‘acf/test-any’,
),
),
),
));
Doesnt work for me also.
I think you have prevent default somewhere
the same for me
For me .addAction('submit'
doesnt trigger.
Have you checked the video that I send to you? I use the same sting as in the docs and it doenst work on the video.
https://monosnap.com/file/fkJQq8jz9ctsOmEXt3MPujP7wtcKKy.png
Let me explain you. I will record a video.
I understand right it, i know what it does. Do you read this topic https://github.com/elliotcondon/acf/issues/36 ?
One more time, i need add row in panel like a tab.
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.