Home › Forums › Backend Issues (wp-admin) › A user meta field won’t get saved for SOME users › Reply To: A user meta field won’t get saved for SOME users
I don’t know anything about sub-fields.
I generated the entire field group for you in php (it’s in a foreign language):
We are talking about the very first item ‘label’ => ‘Tagsági forma’,
‘name’ => ‘tagsagiforma’
It looks like any other field, I have fields with checkboxes and select type inputs, but they all work. Also tried re-ordering it.
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group( array(
'key' => 'group_634d783826828',
'title' => 'Felhasználó extra információk',
'fields' => array(
array(
'key' => 'field_6357a757b976d',
'label' => 'Tagsági forma',
'name' => 'tagsagiforma',
'aria-label' => '',
'type' => 'radio',
'instructions' => 'A felhasználó tagsági formája',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'Egyéni tag' => 'Egyéni tag',
'Céges tag' => 'Céges tag',
'Pártoló tag' => 'Pártoló tag',
'Tiszteletbeli tag' => 'Tiszteletbeli tag',
'Tiszteletbeli alelnök' => 'Tiszteletbeli alelnök',
),
'default_value' => '',
'return_format' => 'array',
'allow_null' => 0,
'other_choice' => 0,
'layout' => 'vertical',
'save_other_choice' => 0,
),
array(
'key' => 'field_6357ac1d21e26',
'label' => 'Egyéni vállalkozó v. magánszemély? (Csak Egyéni tag esetén értelmezendő)',
'name' => 'ev',
'aria-label' => '',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_6357a757b976d',
'operator' => '==',
'value' => 'Egyéni tag',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'Egyéni vállalkozó' => 'Egyéni vállalkozó',
'Magánszemély' => 'Magánszemély',
),
'default_value' => false,
'return_format' => 'array',
'multiple' => 0,
'allow_null' => 0,
'ui' => 0,
'ajax' => 0,
'placeholder' => '',
),
array(
'key' => 'field_6357ae2621e27',
'label' => 'Cégnév',
'name' => 'cegnev',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357afc99687e',
'label' => 'Telefonszám',
'name' => 'telefonszam',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_643fb0d418590',
'label' => 'Telefonszám (vonalas)',
'name' => 'telefonszam_2',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357afd39687f',
'label' => 'Beosztás',
'name' => 'beosztas',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357ae3521e28',
'label' => 'Adószám',
'name' => 'adoszam',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_634d7887cddb9',
'label' => 'Tagozatok',
'name' => 'tagozatok',
'aria-label' => '',
'type' => 'checkbox',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'Vámtagozat' => 'Vámtagozat',
'Jövedéki Tagozat' => 'Jövedéki Tagozat',
'Környezetvédelmi Tagozat' => 'Környezetvédelmi Tagozat',
'Integrátori Tagozat' => 'Integrátori Tagozat',
'Informatikai Munkacsoport"' => 'Informatikai Munkacsoport"',
'Adóügyi Munkacsoport' => 'Adóügyi Munkacsoport',
'Nemzetközi Munkacsoport' => 'Nemzetközi Munkacsoport',
'Trade Compliance Munkacsoport' => 'Trade Compliance Munkacsoport',
),
'default_value' => array(
),
'return_format' => 'value',
'allow_custom' => 0,
'layout' => 'vertical',
'toggle' => 0,
'save_custom' => 0,
'custom_choice_button_text' => 'Add new choice',
),
array(
'key' => 'field_6357aea296874',
'label' => 'Irányítószám',
'name' => 'iranyitoszam',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357aeac96875',
'label' => 'Település',
'name' => 'telepules',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357aeb296876',
'label' => 'Utca, házszám',
'name' => 'utca',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357aec896877',
'label' => 'Emelet, ajtó, stb.',
'name' => 'emelet',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357aed596878',
'label' => 'Logó feltöltés',
'name' => 'logo',
'aria-label' => '',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'array',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
'preview_size' => 'medium',
),
array(
'key' => 'field_6357af0196879',
'label' => 'Fő tevékenység',
'name' => 'tevekenyseg',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357af249687a',
'label' => 'Tevékenység leírás',
'name' => 'tevekenysegleiras',
'aria-label' => '',
'type' => 'textarea',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'rows' => '',
'placeholder' => '',
'new_lines' => '',
),
array(
'key' => 'field_6357af4a9687b',
'label' => 'Alkalmazottak száma',
'name' => 'alkalmazottak',
'aria-label' => '',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'0-10 fő' => '0-10 fő',
'11-50 fő' => '11-50 fő',
'51-250 fő' => '51-250 fő',
'250 fő felett' => '250 fő felett',
),
'default_value' => false,
'return_format' => 'array',
'multiple' => 0,
'allow_null' => 0,
'ui' => 0,
'ajax' => 0,
'placeholder' => '',
),
array(
'key' => 'field_6357a920a5bd4',
'label' => 'Számlázási ciklus',
'name' => 'szamlaciklus',
'aria-label' => '',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'Évente' => 'Évente',
'Fél évente' => 'Fél évente',
),
'default_value' => false,
'return_format' => 'value',
'multiple' => 0,
'allow_null' => 0,
'ui' => 0,
'ajax' => 0,
'placeholder' => '',
),
array(
'key' => 'field_6357af8b9687c',
'label' => 'Levelezési cím',
'name' => 'levelezes',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357afab9687d',
'label' => 'Megrendelés szám',
'name' => 'megrendelesszam',
'aria-label' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6357b5b74ff89',
'label' => 'Logó használat?',
'name' => 'logohasznalat',
'aria-label' => '',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'message' => 'Az MVSZ a weboldalon megjelenítheti a logómat. (Ha ennek engedélyét utólag szeretné visszavonni, kérjük lépjen kapcsolatba munkatársunkkal)',
'default_value' => 0,
'ui' => 0,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_6357b487652c4',
'label' => 'Hír megjelenés?',
'name' => 'hirmegjelenes',
'aria-label' => '',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'message' => 'Az MVSZ a weboldalon rövid hírt jeleníthet meg a csatlakozásomról.',
'default_value' => 0,
'ui' => 0,
'ui_on_text' => '',
'ui_off_text' => '',
),
array(
'key' => 'field_643fafdc0972f',
'label' => 'Megjegyzések',
'name' => 'megjegyzes',
'aria-label' => '',
'type' => 'textarea',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'new_lines' => '',
'maxlength' => '',
'placeholder' => '',
'rows' => '',
),
),
'location' => array(
array(
array(
'param' => 'user_form',
'operator' => '==',
'value' => 'all',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => true,
'description' => '',
'show_in_rest' => 0,
) );
} );
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!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 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.