Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi DFM,
Thank you for contacting us.
If you upgrade the MB Builder from version 3 to 4, it is possible some problem happens. Please follow this document to migrate the data https://docs.metabox.io/extensions/meta-box-builder/#upgrade.
Then try to re-save the permalink settings (post name), clear cache, and re-check this issue.
Long Nguyen
ModeratorHi,
Two settings
storage_typeandtablehave to be added under the meta box settings, not the field settings.And the group is a field type, it has to be added under the field settings.
For example:
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'title' => 'Meta Box Title', 'post_types' => 'CPT', 'storage_type' => 'custom_table', // Important 'table' => 'my_custom_table', // Your custom table name 'fields' => array( array( 'name' => 'Group', // Optional 'id' => 'group_id', 'type' => 'group', // List of sub-fields 'fields' => array( array( 'name' => 'Text', 'id' => 'text', 'type' => 'text', ), // Other sub-fields here ), ), ), ); return $meta_boxes; }Get more details on these documents
https://docs.metabox.io/extensions/mb-custom-table/#using-custom-tables
https://docs.metabox.io/extensions/meta-box-group/Long Nguyen
ModeratorHi,
You can follow Johannes's reply to customize the registration form https://support.metabox.io/topic/registration-username-as-email-duplicated-fields-avatar-visibility-issue/page/2/#post-21465.
function add_more_registration_fields( $fields ) { $fields = [ 'first_name' => [ 'name' => 'First Name', 'id' => 'first_name', 'type' => 'text', 'required' => 1 ], 'last_name' => [ 'name' => 'Last Name', 'id' => 'last_name', 'type' => 'text', 'required' => 1 ], 'username' => [ 'name' => __( 'Username', 'mb-user-profile' ), 'id' => 'user_login', 'type' => 'text', 'required' => true, ], 'email' => [ 'name' => __( 'Email', 'mb-user-profile' ), 'id' => 'user_email', 'type' => 'email', 'required' => true, ], 'password' => [ 'name' => __( 'Password', 'mb-user-profile' ), 'id' => 'user_pass', 'type' => 'password', 'required' => true, 'desc' => '<span id="password-strength" class="rwmb-password-strength"></span>', ], 'password2' => [ 'name' => __( 'Confirm Password', 'mb-user-profile' ), 'id' => 'user_pass2', 'type' => 'password', 'required' => true, ], // ... add more fields here ]; return $fields; } add_filter( 'rwmb_profile_register_fields', 'add_more_registration_fields' );Get more form filters here https://docs.metabox.io/extensions/mb-user-profile/#form-fields-filters. They are located in the file
wp-content/plugins/mb-user-profile/src/DefaultFields.php.Long Nguyen
ModeratorHi Martin,
There are two problems with your code.
- Use a double couple of curly bracket {{ }} means to echo or display a value.
- The comparison operator is
==or strict compare===, not=only.
The code should be
{% if ( mb.check_user_role() == 'user-role' ) %}Long Nguyen
ModeratorHi Hazmi,
Thank you for your reporting.
I will inform the development team to update the extension with the new reCaptcha Enterprise. It will be included in the next update as soon as possible.
Long Nguyen
ModeratorHi,
In the new version, please add the sub-field to the group manually. The behavior drag and drop fields into the group is removed.
Long Nguyen
ModeratorHi,
You should use the code to validate the field value and refer to this topic https://support.metabox.io/topic/remote-validation-example/.
If you are using the extension MB Frontend Submission, it works as same as on the backend.
Long Nguyen
ModeratorHi,
The filter only supports post type and taxonomy. It's a setting of MB Admin Columns extension https://docs.metabox.io/extensions/mb-admin-columns/#3-advanced-configuration.
I'm going to create a feature request for the development team to support the filter on the Media page.
Long Nguyen
ModeratorHi,
We can add more clone groups by clicking the "Add More" button, screenshot https://share.getcloudapp.com/jkuejERk.
It creates a new group from the default settings (when registering the meta box), not create a new one from your current (clone) group.
Get more details here https://docs.metabox.io/cloning-fields/.
Long Nguyen
ModeratorHi,
Do you mean the field value is unique in the database? You can use the validation rule
remoteto check the field value with a PHP function.Refer to these topics to know how to use
https://support.metabox.io/topic/remote-validation-example/
https://stackoverflow.com/questions/22814260/wordpress-how-to-add-a-post-meta-keeping-the-value-uniqueLong Nguyen
ModeratorHi,
I think the format like the serialized string in the database, for example
a:2:{i:0;s:5:"text3";i:1;s:5:"text4";}You can try to use the plugin WP All Export to export the data with custom fields then re-import it.
Long Nguyen
ModeratorHi,
The Key Master Anh Tran has replied to your questions on FB. I'm just pasting it here and mark the topic as Resolved.
Q1: You can save user data in custom fields. But limiting users by post types requires custom coding. You might need 2 functions: create custom roles - which can be done with code or a plugin like Members, and restrict content by CPT can be done with code (by checking role before loading the template files).
Q2: With only that requirements, I think there are no problems using WP. Things might change if you need other functionality that targets users other than content (which WP is great for).
Long Nguyen
ModeratorHi Virgile,
Thank you for your reporting.
I'm going to check this issue and let you know later.
Long Nguyen
ModeratorHi,
It's the field ID when you create the custom field.
$meta_boxes[] = array( 'title' => 'Personal Information', 'post_types' => 'post', 'fields' => array( array( 'name' => 'Full name', 'desc' => 'Format: {First Name} {Last Name}', 'id' => 'prefix_name', // here is the field ID (meta key) 'type' => 'text', ), ) );Get more details here https://docs.metabox.io/field-settings/
Long Nguyen
ModeratorHi,
You can share the screenshot via this tool https://prnt.sc/.
What is widget of Elementor are you using?
What do you mean "set meta field key"? Is that the "get field value"?
-
AuthorPosts