Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
We can only set the default value for the first clone item when loaded, after that the user can check multiple boxes. However, thanks for the idea, I will create a feature request to support this case. At this time, you can pop the first value of the array to show as the default value if the user checks multiple boxes.
Thanks for your patience.
Long Nguyen
ModeratorHi,
If you want to create options for the select field in MB Builder, just type the pair
value: labelin the Choice area and Default value for default. Please see my screenshot https://cl.ly/6c6440db3804April 24, 2020 at 8:04 PM in reply to: ✅Field to insert code for a view has become very small #19270Long Nguyen
ModeratorHi,
On my local site, the code area in View displays as well. Could you please deactivate all plugins include the Meta Box then activate all and check it again?
April 24, 2020 at 3:44 PM in reply to: ✅Trouble getting file url of file attachment in cloneable group #19265Long Nguyen
ModeratorHi,
The select field must have not-empty options to choose from. In this case, I think you should use the field checkbox, just on/off (true/false).
Long Nguyen
ModeratorHi,
I'm going to check it out and let you know later.
Thank you.
Long Nguyen
ModeratorHi,
There is a confusion with your shortcode,
compositionis the meta box ID and the functionrwmb_meta()supports to display the field value with the field ID. Please try to create the fieldgroupand get the value with the functionrwmb_meta()again.For more information, please follow the documentation
https://docs.metabox.io/displaying-fields/
https://docs.metabox.io/extensions/meta-box-group/Long Nguyen
ModeratorHi,
I've tested the field
Dateon my local site, it saves and displays the date (human-read) as well. Could you please deactivate all plugins except Meta Box plugins then check the problem again? If it still happens, please try to open the Console tab in Developer tool and let me know if there are any error notice.Long Nguyen
ModeratorHi,
Does that mean the Quick Edit option? https://cl.ly/da7757a7bb53
I will discuss this with the developer team to create a new feature to support this case. Thanks for the idea.
Long Nguyen
ModeratorHi,
Because the field
checkboxis inside the fieldgroupso when we add a new group (clone) the checkbox also generated. You can drag and drop the checkbox field above the group field or delete and create a new one, see my screen record.Or change the code to
array( 'id' => $prefix . 'select_default', 'name' => esc_html__( 'Checkbox', 'metabox-online-generator' ), 'type' => 'checkbox', ), array( 'id' => $prefix .'switcher_group', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'fields' => array( // Normal field (cloned) array( 'name' => 'Value', 'id' => $prefix .'switcher_value', 'type' => 'text', 'columns' => 6, ), array( 'name' => 'Label', 'id' => $prefix .'switcher_label', 'type' => 'text', 'columns' => 6, ), ), 'hidden' => array( $prefix . 'select', '!=', 'switch' ), ),April 24, 2020 at 9:18 AM in reply to: ✅Connecting Related Custom Post Types With Frontend Form #19252Long Nguyen
ModeratorHi Tobias,
Thank you for contacting us. Hope you are well today.
The extension MB Relationships supports to create the relation in the backend. In the frontend submission form, thank you for the idea, I'm going to discuss with the developer team and create a request feature to support relationship in the frontend.
Have a nice day.
Long Nguyen
ModeratorHi,
The problem is the slug of post type, it should be
'post_type' => 'aandoening',not the singular nameAandoening. Please change the relationship code and check the admin column again.Long Nguyen
ModeratorHi,
I've tested on my local site, the relationships and admin columns still display as well. Please see my screenshots
https://cl.ly/68be801b777f
https://cl.ly/33e79a24a93cCould you please deactivate all plugins except Meta Box plugins then check the problem again?
Or you can test with sample relationships between posts and pages
add_action( 'mb_relationships_init', function() { MB_Relationships_API::register( [ 'id' => 'posts_to_pages', 'from' => [ 'object_type' => 'post', 'post_type' => 'post', 'meta_box' => [ 'title' => 'Connect Pages', 'priority' => 'high', ], 'admin_column' => 'after title', // THIS! ], 'to' => [ 'object_type' => 'post', 'post_type' => 'page', 'meta_box' => [ 'title' => 'Connect Posts', 'priority' => 'high', ], 'admin_column' => 'after title', // THIS! ], ] ); } );April 23, 2020 at 2:26 PM in reply to: ✅Trouble getting file url of file attachment in cloneable group #19238Long Nguyen
ModeratorHi,
If you change the field ID, after saving the new value, WordPress generates the new meta key that corresponds with the field ID and saves it in the new row(s) in the database. The old ID (meta key) still there and called Orphan metadata, you can follow these guides to know how to delete it and clean up the database
https://www.fixrunner.com/how-to-easily-clean-up-your-wordpress-database/
https://www.wpbeginner.com/plugins/how-to-clean-up-your-wordpress-database-for-improved-performance/April 23, 2020 at 11:00 AM in reply to: ✅How to create a unique identifier for each group when using clonable/sortable #19236Long Nguyen
ModeratorHi there,
I think there is a way to help you achieve this goal.
- Create a custom select field (page meta)
- Get the group value in the settings page by following this documentation
https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value - Show the video name with select items (you may need to use
foreachif it's cloneable)
In this way, the page meta always shows the current video name even the admin change the name on the settings page.
You can follow this documentation and this topic to create a custom field type.
April 23, 2020 at 10:11 AM in reply to: ✅Bug with most recent update: Error from WooCommerce Log #19235Long Nguyen
ModeratorHi,
Please follow the example https://docs.metabox.io/extensions/mb-admin-columns/#example-1
you should use this format for all the columns
$this->add( $columns, 'column_id', 'Column Title', $position, $target );
for the better support.if you use the code in the file
custom.phpthen you need to require it on the filefunctions.phpThe
$positionisbeforeorafterand the$targetis the column id that means the custom column show before the column Title in the example. -
AuthorPosts