Home › Forums › Bug Reports › Bug in acf post field when save post
Hi, I have some problems. I have created this field:
if(function_exists("register_field_group"))
{
register_field_group(array (
'id' => 'acf_product-info',
'title' => 'Product Info',
'fields' => array (
array (
'key' => 'field_53cbd4c51926c',
'label' => 'Rules',
'name' => 'rule',
'type' => 'radio',
'required' => 1,
'choices' => array (
'Designer' => 'Designer',
'Artist' => 'Artist',
),
'other_choice' => 0,
'save_other_choice' => 0,
'default_value' => '',
'layout' => 'horizontal',
),
array (
'key' => 'field_53cbd4276c661',
'label' => 'Designer / Artist',
'name' => 'designer',
'type' => 'select',
'choices' => array (
'Vincenzo D\'Alba' => 'Vincenzo D\'Alba',
),
'default_value' => '',
'allow_null' => 0,
'multiple' => 0,
),
array (
'key' => 'field_53187bc05f470',
'label' => 'Year of production',
'name' => 'yop',
'type' => 'number',
'instructions' => '2014',
'required' => 1,
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'min' => 1950,
'max' => 2014,
'step' => '',
),
array (
'key' => 'field_53191140cc7f9',
'label' => 'Materials',
'name' => 'materials',
'type' => 'text',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'formatting' => 'none',
'maxlength' => '',
),
array (
'key' => 'field_53cbd6e2a1687',
'label' => 'Size / Circle',
'name' => 'sircle',
'type' => 'radio',
'choices' => array (
'Size' => 'Size',
'Circle' => 'Circle',
),
'other_choice' => 0,
'save_other_choice' => 0,
'default_value' => 'Size',
'layout' => 'horizontal',
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'product',
'order_no' => 0,
'group_no' => 0,
),
),
),
'options' => array (
'position' => 'side',
'layout' => 'default',
'hide_on_screen' => array (
),
),
'menu_order' => 0,
));
register_field_group(array (
'id' => 'acf_product-section-image',
'title' => 'Product section image',
'fields' => array (
array (
'key' => 'field_5384908cf1369',
'label' => 'Product Section Image',
'name' => 'ps_img',
'type' => 'image',
'save_format' => 'url',
'preview_size' => 'thumbnail',
'library' => 'all',
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'product',
'order_no' => 0,
'group_no' => 0,
),
),
),
'options' => array (
'position' => 'side',
'layout' => 'default',
'hide_on_screen' => array (
),
),
'menu_order' => 0,
));
}
After I try to save the setup up setting value in post, the setting value remain blank.
What should I do to solve the problem?
I have installed the last version of wordpress, acf and woocommerce.
I need urgently a solution.
Thanks
You must be logged in to reply to this topic.
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’re working hard on Advanced Custom Fields PRO 6.0, and Beta 1 is now available 🚀
— Advanced Custom Fields (@wp_acf) August 12, 2022
Featuring improved performance for Repeater fields with large datasets, and a new generation of ACF Blocks.
Let’s take a look 🧵https://t.co/Befre3kFAo
© 2022 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.