The best way to do this is by using JavaScript and there is a couple of CMB2 plugins let you do that easily:
Related Posts:
- Display oembed in repeatable metaboxs using CMB2
- How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
- Removing panels (meta boxes) in the Block Editor
- WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins
- How can I create a taxonomy meta-box with search suggestions but no new terms input?
- How to Add Reminders/Notes to New Post Meta Boxes
- How to reorder meta box position?
- Custom Meta Boxes: multiple fields within a repeatable field
- echo value from ‘select’ field type into page template using cmb2?
- get registered metaboxes by post type or post ID
- Remove metabox from specific page template in admin
- Is there a filter/action to add content to WP admin metaboxes?
- Attach Files Metabox
- esc before saving or before displaying does it matter?
- how to sanitize checkbox input?
- How to insert Gallery shortcode to a meta box
- Check if meta key value already exists
- Display list of tags as drop down menu or radio buttons in a meta box?
- Validation Function for URL in plugin
- How to List all Sidebars in a Metabox
- Conditional Meta Boxes
- Why is `add_meta_box` not working?
- How to access global $wp_meta_boxes variable on front-end?
- Save checkboxes of a metabox with a foreach loop (invalid argument)
- Add template meta box to category edit page?
- How to add meta boxes to the ‘Add new post’ screen?
- How do I migrate meta boxes from the Classic Editor to the “side area” in Gutenberg Editor?
- update a post meta from a single table cell TablePress
- Multiple Checkboxes Metabox
- Best Way to Remove WordPress Meta Box based on Post Status
- Consolidate Metaboxes into 1 Big Metabox
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- Hide Meta Boxes for Non-Admins
- Set the default value as checked for a meta box checkbox
- Alternative to esc_textarea
- Change headline text for post thumbnail meta box
- Undefined ‘post_type’ error on Add new page
- RW Meta Box ,Problem setting post title
- metabox wordpress show in frontend
- How to use get_post_custom function on the blog page?
- Multiplicate entry on update_post_meta
- Populate meta select box with child pages
- Problem with meta box in Links
- get_post_type on post.php
- Post Meta not saving when have empty post
- How to modify Publish metabox?
- Hide Polylang metabox from the post edit sidebar
- Meta box html is not updating after saving
- How can I make my metabox appear?
- Controlling Meta Box Height
- Custom Meta box only returns most recent value on page
- Custom Sortable Meta Boxes
- how can i do metabox [closed]
- How to add meta box for image upload using WordPress media uploader?
- why add_menu_page use simple function as arg while add_meta_box a call back?
- Output from Meta Box Array
- Custom post type, have only my meta boxes
- How to show the value of specific key from nested array?
- Getting metabox value?
- Hide Page Title with Post Meta
- Remove meta box except on category pages
- Meta box does not save or update
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Show button if meta box has content, else hide
- Post Excerpt field only showing for default administrator
- Save JSON object attributes to custom metabox
- Is ‘repeatable’ a field type for meta boxes?
- Checkbox in post not saving value
- Custom loop attached to link
- post meta – problem : copy the same meta for all the articles
- ACF – Hiding metaboxes through screen settings doesn’t work
- Remove Username and just show Name in Author Metabox in backend
- how can I make this metabox area
- WordPress default post categories meta box widget
- Metabox not saving values
- How to determine wether a post gets just created
- Update Post Meta in Front End with a form
- Metabox with checkbox is not working true!
- Featured Gallery to custom post type
- Displaying a Metabox linked to post settings for all users
- Save datapicker date into wordpress admin
- Can’t get meta values to save
- Unable to save multiple images in wordpress
- My own metabox checkbox plugin only saves the last value I’ve checked
- Custom WP Meta Box – Use data from within the post screen inside meta box
- How to show select_advanced content instead of ID?
- Error when adding Meta Boxes, but only when adding 3 with the same callback
- Custom meta box using OOP way doesn’t save data
- A correct hook for saving meta boxes data
- update_post_meta does not work
- Hooking into the Meta Boxes (Name/Web Address/Description) on the ‘Add New Link’ Page
- Metabox Data not saving
- when saveing $meta_box i get Undefined index error
- Adding a Custom ‘Now’ button under ‘Published on’ header to return current date and time
- Adding meta boxes to custom post type
- Meta boxes not showing up
- How do I create a Meta box that can be repeated? (with an image section and text area)
- Need help, Passing variables with get_post_meta
- Metaboxes – why they don’t render php in expected manner?
- Meta box not displaying on the plugin page