Support Forum
Support › MB Custom Table › Metabox Builder Not saving anything Custom tableResolved
Hi,
Frustrated....
Metabox Builder Not saving anything for User Profile('Extended' custom fields) in the Custom table?
Setings: selected these...
Save Data in custom table
Custom table - aa_user_settings_meta_mb
include table Prefix
Create Table Automatically
The table has been created but noting saves when I go to my Admin Proofile add some data to save.
Kind regrds
Jay
Hi,
Please get the PHP code of the field group in the builder and share it here. I will help you to check the issue. Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Extended', 'your-text-domain' ),
'id' => 'user-settings-meta-mb',
'tab_style' => 'box',
'type' => 'user',
'storage_type' => 'custom_table',
'table' => 'aa_user_settings_meta_mb',
'tabs' => [
'tab_additional_user_fields' => [
'label' => 'Additional Information',
'icon' => 'dashicons-universal-access-alt',
],
],
'fields' => [
[
'name' => __( 'Profile Picture MB', 'your-text-domain' ),
'id' => $prefix . 'profile_picture_mb',
'type' => 'single_image',
'force_delete' => true,
'admin_columns' => [
'position' => 'after title',
'title' => 'Avatar',
'before' => '<strong>',
'after' => '</strong>',
],
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'About Me MB', 'your-text-domain' ),
'id' => $prefix . 'about_me_mb',
'type' => 'textarea',
'placeholder' => __( 'Enter MB Description', 'your-text-domain' ),
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'House Number MB', 'your-text-domain' ),
'id' => $prefix . 'house_number_mb',
'type' => 'text',
'placeholder' => __( 'member house number', 'your-text-domain' ),
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Street MB', 'your-text-domain' ),
'id' => $prefix . 'street_mb',
'type' => 'text',
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Town MB', 'your-text-domain' ),
'id' => $prefix . 'town_mb',
'type' => 'text',
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'City MB', 'your-text-domain' ),
'id' => $prefix . 'city_mb',
'type' => 'text',
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Post Code MB', 'your-text-domain' ),
'id' => $prefix . 'post_code_mb',
'type' => 'text',
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Country MB', 'your-text-domain' ),
'id' => $prefix . 'country_mb',
'type' => 'select',
'options' => [
'england' => __( 'England', 'your-text-domain' ),
'scotland' => __( 'Scotland', 'your-text-domain' ),
'wales' => __( 'Wales', 'your-text-domain' ),
'northern_ireland' => __( 'Northern Ireland', 'your-text-domain' ),
],
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Phone MB', 'your-text-domain' ),
'id' => $prefix . 'phone_mb',
'type' => 'group',
'desc' => __( 'Group Cloned - Repeater Multiple Phone Numbers', 'your-text-domain' ),
'clone' => true,
'sort_clone' => true,
'clone_as_multiple' => true,
'fields' => [
[
'name' => __( 'Phone Type MB', 'your-text-domain' ),
'id' => $prefix . 'phone_type_mb',
'type' => 'select',
'options' => [
'mobile' => __( 'Mobile', 'your-text-domain' ),
'landline' => __( 'Landline', 'your-text-domain' ),
],
'columns' => 6,
],
[
'name' => __( 'Phone Number MB', 'your-text-domain' ),
'id' => $prefix . 'phone_number_mb',
'type' => 'text',
'columns' => 6,
],
],
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Payroll Code MB', 'your-text-domain' ),
'id' => $prefix . 'payroll_code_mb',
'type' => 'number',
'desc' => __( 'Payroll Code ID or use current date and time 210720221200', 'your-text-domain' ),
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Department MB', 'your-text-domain' ),
'id' => $prefix . 'department_mb',
'type' => 'select',
'desc' => __( 'Department Office Backend Organisation', 'your-text-domain' ),
'options' => [
'cleaner_ops' => __( 'Cleaner Operations', 'your-text-domain' ),
'backoffice' => __( 'Backoffice (general)', 'your-text-domain' ),
'finance' => __( 'Finance (accounts)', 'your-text-domain' ),
'hr' => __( 'Human Resources', 'your-text-domain' ),
'it' => __( 'Information Technology', 'your-text-domain' ),
'client_services' => __( 'Client Services', 'your-text-domain' ),
'facilities' => __( 'Facilities Management', 'your-text-domain' ),
'legal' => __( 'Legal', 'your-text-domain' ),
'construction' => __( 'Construction', 'your-text-domain' ),
'procurement' => __( 'Procurement', 'your-text-domain' ),
'environmental' => __( 'Environmental Control', 'your-text-domain' ),
],
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Team MB', 'your-text-domain' ),
'id' => $prefix . 'team_mb',
'type' => 'select',
'options' => [
'alpha' => __( 'Alpha (cleaners)', 'your-text-domain' ),
'bravo' => __( 'Bravo (cleaners)', 'your-text-domain' ),
'charlie' => __( 'Charlie(cleaners)', 'your-text-domain' ),
'delta' => __( 'Delta (cleaners)', 'your-text-domain' ),
'Foxtrot' => __( 'Foxtrot (backoffice)', 'your-text-domain' ),
'Golf' => __( 'Golf (contractors)', 'your-text-domain' ),
],
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
[
'name' => __( 'Job Title MB', 'your-text-domain' ),
'id' => $prefix . 'job_title_mb',
'type' => 'select',
'options' => [
'cleaner' => __( 'Cleaner (general)', 'your-text-domain' ),
'house_keeper' => __( 'House Keeper (maid)', 'your-text-domain' ),
'window_cleaner' => __( 'Window Cleaner', 'your-text-domain' ),
'jet_washer' => __( 'Jet Washer', 'your-text-domain' ),
'driver' => __( 'Driver', 'your-text-domain' ),
'supervisor' => __( 'Supervisor', 'your-text-domain' ),
'team_leader' => __( 'Team Leader', 'your-text-domain' ),
'contractor' => __( 'Contractor', 'your-text-domain' ),
'waster_collector' => __( 'Waste Collector', 'your-text-domain' ),
'janitor' => __( 'Janitor', 'your-text-domain' ),
'exterminator' => __( 'Exterminator', 'your-text-domain' ),
'director' => __( 'Director', 'your-text-domain' ),
'vp' => __( 'Vice President', 'your-text-domain' ),
'manager' => __( 'Manager', 'your-text-domain' ),
'stock_controller' => __( 'Stock Controller', 'your-text-domain' ),
'accountant' => __( 'Accountant', 'your-text-domain' ),
'admin' => __( 'Administrator (backoffice)', 'your-text-domain' ),
],
'columns' => 6,
'tab' => 'tab_additional_user_fields',
],
],
];
return $meta_boxes;
}
Hi,
I've replied to your question on this topic https://support.metabox.io/topic/update-combine-custom-post-with-details-from-another-post-type
so please discuss it there and I will mark this topic as Resolved.