Tabs Doesn't Work
- This topic has 4 replies, 2 voices, and was last updated 3 years, 4 months ago by
Jeremy Parrott.
-
AuthorPosts
-
August 6, 2021 at 6:21 AM #29942
Jeremy Parrott
ParticipantNo matter if I use the code or the builder, there is a bug with the display of the tab sub-fields. The first tab works great, but the second one is blank. Sometimes the third tab works, but I am not sure why.
Making the tabs before the sub-fields of the tab DO NOT fix the problem. I have tried this 5 times with the same result.
Additionally, when selecting the dashicons, the icons do not show up; which I can see why because they do not include the 'dashicons-' before the icon name. I can fix that with the code, but I figured you should know.
Attached are 4 screen shots and my php export code.
https://drive.google.com/file/d/1hcEfXENU-Z-DlY8zQ4uBf6XCbJLnrTb4/view?usp=sharing
https://drive.google.com/file/d/1R6K7POWGp89idEv5DXGOaVlBHWlK6UpV/view?usp=sharing
https://drive.google.com/file/d/1VD5cAsgQGAPv3Nx25Pd-t0w2QmcrrbUj/view?usp=sharing
https://drive.google.com/file/d/1ZiUBOVlnTVVPG7-gcsAWR6ApvmAjOQXz/view?usp=sharing<?php add_filter( 'rwmb_meta_boxes', 'monitor_fields_php_export' ); function monitor_fields_php_export( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Monitor Fields', 'Monitor Fields' ), 'id' => 'monitor-fields', 'post_types' => ['monitor'], 'tab_default_active' => 'monitor_details', 'storage_type' => 'custom_table', 'table' => 'wp_monitor_table', 'tabs' => [ 'monitor_details' => [ 'label' => 'Monitor Details', 'icon' => 'chart-bar', ], 'tank_configuration' => [ 'label' => 'Tank Configuration', 'icon' => 'category', ], ], 'fields' => [ [ 'name' => __( 'Active', 'monitor_status' ), 'id' => $prefix . 'active', 'type' => 'switch', 'style' => 'rounded', 'on_label' => 'Active', 'off_label' => 'Inactive', 'std' => true, 'columns' => 2, 'tab' => 'monitor_details', ], [ 'name' => __( 'Total Gallons', 'total_gallons' ), 'id' => $prefix . 'total_gallons', 'type' => 'number', 'columns' => 3, 'tab' => 'tank_configuration', ], ], ]; return $meta_boxes; }
August 6, 2021 at 5:09 PM #29966Long Nguyen
ModeratorHi,
Total columns under each tab should be 12, like this
'fields' => [ [ 'name' => __( 'Active', 'monitor_status' ), 'id' => $prefix . 'active', 'type' => 'switch', 'style' => 'rounded', 'on_label' => 'Active', 'off_label' => 'Inactive', 'std' => true, 'columns' => 12, 'tab' => 'monitor_details', ], [ 'name' => __( 'Total Gallons', 'total_gallons' ), 'id' => $prefix . 'total_gallons', 'type' => 'number', 'columns' => 12, 'tab' => 'tank_configuration', ], ]
Get more details on the documentation https://docs.metabox.io/extensions/meta-box-columns/
August 6, 2021 at 8:49 PM #29968Jeremy Parrott
ParticipantAre you guys still working on the dashicons bug?
August 6, 2021 at 9:20 PM #29970Long Nguyen
ModeratorHi,
Yes, that issue is in our development queue. It will be fixed and included in future updates.
December 2, 2021 at 12:46 AM #32336Jeremy Parrott
ParticipantAny update on fixing the icons for the tabs?
-
AuthorPosts
- You must be logged in to reply to this topic.