Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi ComSi,
- Context: this is set at meta box's level. Did you set for meta box or for the field?
- Multi-select: the documentation means the value saved for those field types are always multiple (you save both parent and children). But the selection for each level is only one. It's how the tree works.
Anh Tran
KeymasterHi Dave,
All media fields store attachment IDs by default. If you want to store file URL (not path), then you can try
filefield withupload_dirsettings. See this for details:https://docs.metabox.io/fields/file/#upload-to-custom-folder
Anh Tran
KeymasterHi,
I think a way to get this done is add
disabledattribute to the select dropdown. You can do that with this code:add_action( 'init', function() { $mb = rwmb_get_registry( 'meta_box' )->get( 'posts_to_pages_relationships_to' ); $mb->meta_box['fields'][0]['attributes']['disabled'] = true; }, 99 );And maybe add some CSS to hide the "+ Add more" button and the delete clone button.
Anh Tran
KeymasterI got it.
There is a settings
clone_defaultfor each field if you want to clone default values. You can set the default value for the whole group (which is an array of default values for sub-fields). Then when cloning, these values will be selected automatically.For user-selected options, they will be cleared when cloning. It's the design at first, since it makes the new clone clean and easy to start entering new values.
Anh Tran
KeymasterHi Nuno,
You just need to define the field like this:
array( 'id' => 'field_id', 'name' => 'Gender', 'options' => array( 'm' => 'Man', 'w' => 'Woman', ), 'std' => 'm', )Anh Tran
KeymasterDo you mean duplicate a group in the MB Builder?
Anh Tran
KeymasterHi Ribano,
Let me check that. In the latest version, I removed the
user_idin some places to fix the security bug. I'll check this again.Anh Tran
KeymasterHi Sam,
I mean you need to download the .zip package from Github and upload to your site, overwriting the current version. It's not yet available in the .org, so you can't update from .org at the moment.
Anh Tran
KeymasterHi Austin,
That's right. The values of sub-fields don't go through the functions that transform the raw value to meaningful values. This is the initial design of the group data.
May 23, 2019 at 10:05 PM in reply to: ✅User Edit After Frontend Submission - only shows confirmation msg #14696Anh Tran
KeymasterI'm making some changes in other extensions and will update the AIO later. If you're in a hurry, please copy the files from the individual plugin and overwrite the files in AIO plugin.
Anh Tran
KeymasterHi guys,
I answered Neil in another topic and via emails. Regarding this problem, the best way to do this at the moment is creating a shortcode and use the shortcode in the page builders. I added sample code in the documentation, please take a look:
https://docs.metabox.io/extensions/meta-box-group/#outputing-group-in-a-page-builder
May 23, 2019 at 10:02 PM in reply to: MB Custom Post Type requires Meta Box to function correctly. Click here to activ #14694Anh Tran
KeymasterHi,
The Problem is, that i read on your FAQ-Page, that i can’t use metaxbox for a small free-version of my Plugin? Why is this and how can i handle it?
If you use free extensions, it's fine to do so. The rule is only active if you include premium extensions in your free plugins and release on .org. That make our premium work free and people have access to it freely.
How can i disable the “Metabox” menuentry in the WP Admin?
You can do that with this line of code:
add_filter( 'rwmb_admin_menu', '__return_false', 99 );Anh Tran
KeymasterHi Will,
When you insert posts, please don't use
add_post_metato add custom fields. Instead, use$wpdbto insert data to the custom table, like this:global $wpdb; $post_id = wp_insert_post( $post_data ); $custom_fields = [ 'ID' => $post_id, 'field_1' => $value_1, 'field_2' => $value_2, ]; $wpdb->insert( 'custom_table', $custom_fields );Anh Tran
KeymasterHi Smartbrand,
We have it in our plan this year and will try to finish it. It's not available at the moment.
-
AuthorPosts