Cannot create acf table field programmatically
-
Hi,
Great plugin. Saved me a lot of time.
I’m trying to create a table field programmatically but for some reason it’s not working. Here is part of my code.register_field_group(array ( 'id' => 'acf_test-table', 'title' => 'Test table', 'fields' => array ( array ( //'key' => 'field_568a92ec26958', 'key' => 'test_table', 'label' => 'TestTable', 'name' => 'test_table', 'type' => 'table', 'use_header' => 1, ), array ( 'key' => 'field_5323276db7e18', 'label' => 'Email Address', 'name' => 'email_address', 'type' => 'email', 'required' => 1, 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', ), ), 'location' => array ( array ( array ( 'param' => 'post_type', 'operator' => '==', 'value' => 'post', 'order_no' => 0, 'group_no' => 0, ), ), ), 'options' => array ( 'position' => 'normal', 'layout' => 'default', 'hide_on_screen' => array ( ), ), 'menu_order' => 4, ));
The test e-mail address field is created. However, the table field isn’t.
Hope you can help me.
Thanks,
Sharif.https://www.ads-software.com/plugins/advanced-custom-fields-table-field/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Cannot create acf table field programmatically’ is closed to new replies.