Admin column for Checkbox List
Support › MB Admin Columns › Admin column for Checkbox ListResolved
- This topic has 6 replies, 2 voices, and was last updated 1 year, 7 months ago by
Andrew Wheeler.
-
AuthorPosts
-
August 23, 2023 at 5:13 PM #43013
Andrew Wheeler
ParticipantIs there an issue with showing an Admin Column for a Checkbox List selection? i have a group with a single top-level Checkbox List field with three options, i've enabled Admin Columns in the AIO extensions and for the field itself, given it a custom column title, and set it to filterable. Nothing. What am i doing wrong?
August 23, 2023 at 10:36 PM #43023Peter
ModeratorHello Andrew,
I don't see that issue on my demo site, screenshot https://imgur.com/pwN5ePG
You can export the field group to a JSON file and share it here. I will help you to check the issue.And please note that, the filterable feature only works with the
taxonomy
field. Read more in the documentation https://docs.metabox.io/extensions/mb-admin-columns/August 24, 2023 at 12:40 AM #43029Andrew Wheeler
ParticipantHi Peter!
Thanks for taking a look at this.
{ "post_type": "meta-box", "post_title": "Product line", "post_date": "2023-08-18 20:16:24", "post_status": "publish", "post_content": "", "settings": { "object_type": "post", "post_types": [ "product" ], "context": "side", "priority": "high", "style": "default", "tab_style": "", "tab_default_active": "", "class": "", "prefix": "", "text_domain": "your-text-domain", "function_name": "your_prefix_function_name" }, "fields": { "checkbox_list_pepuiqyfikc": { "_id": "checkbox_list_pepuiqyfikc", "name": "Product line", "id": "product_line", "type": "checkbox_list", "label_description": "", "desc": "", "options": "Olive\r\nSnail\r\nHyaluronic", "std": "", "min_clone": "", "max_clone": "", "add_button": "", "admin_columns": { "enable": true, "position": { "type": "after", "column": "Categories" }, "title": "", "before": "", "after": "", "sort": true, "link": "edit" }, "columns": 12, "before": "", "after": "", "class": "", "sanitize_callback": "", "save_field": true } }, "data": [], "meta_box": { "title": "Product line", "id": "product-line", "post_types": [ "product" ], "context": "side", "text_domain": "your-text-domain", "function_name": "your_prefix_function_name", "fields": [ { "name": "Product line", "id": "product_line", "type": "checkbox_list", "options": { "Olive": "Olive", "Snail": "Snail", "Hyaluronic": "Hyaluronic" }, "admin_columns": { "position": "after Categories", "sort": true, "link": "edit" } } ] } }
August 24, 2023 at 12:43 AM #43030Andrew Wheeler
Participantcould you also explain why i have a default '_id'? how do i get rid of it?
August 27, 2023 at 5:02 PM #43046Peter
ModeratorHello,
You should add the column ID instead of the column title to display the admin column, it should be
product_cat
, notCategories
. Screenshot https://imgur.com/ep6eNHaRegarding the default
_id
field, it is a hidden-standard custom field of the field group when using the builder. We shouldn't touch this field or get rid of it.August 27, 2023 at 7:04 PM #43048Andrew Wheeler
Participantgreat, thank you, that worked! silly me.
August 28, 2023 at 3:49 PM #43059Andrew Wheeler
Participantno, wait! i am trying to add a second MB admin column after a first one, and that's not working. what does work is if it is adjacent to a default woo column. but not if i'm trying to specify it's position in relation to another MB column. so: before default woo 'date' works, but after custom MB 'product_line' doesn't. i'm following your correction, to specify the column postion using the column ID, and i'm trying to put 'product_routine' AFTER 'product_line' but it doesn't work. putting 'product_routine' BEFORE woo 'date' does. can you have a look at this for me please?
-
AuthorPosts
- You must be logged in to reply to this topic.