Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
By default, the shortcode
[mb_user_profile_register]displays 4 base fields to register a user: Username, Email, Password and Confirm Password. If you want to create more user meta, you can add the meta box id to the shortcode.For more information, please follow the documentation.
https://docs.metabox.io/extensions/mb-user-profile/#registration-formLong Nguyen
ModeratorHi,
The extension supports an action hook
rwmb_frontend_after_processwhich helps you fire an action after saving/updating the post. You can use this action hook to update the post meta_expiration-datewith this functionupdate_post_meta().
https://codex.wordpress.org/Function_Reference/update_post_metaLong Nguyen
ModeratorPlease follow this topic https://support.metabox.io/topic/how-to-set-placeholders-for-post-title-and-post-contents/.
May 25, 2020 at 8:07 AM in reply to: ✅How to set placeholders for post title and post contents? #19774Long Nguyen
ModeratorHi,
We have a tutorial that helps you save the field content as the post content.
https://docs.metabox.io/save-wysiwyg-content-post-content/You can also use the field
textareainstead ofWYSIWYGand use the settingsplaceholderof this field.
https://docs.metabox.io/fields/textarea/#settingsLong Nguyen
ModeratorHi,
It looks very strange, on my testing site it does not show the problem like your screen record. Could you please deactivate all plugins except Meta Box and Meta Box AIO then check the problem again? Also, please open the console tab of the browser developer tools and let me know if there is any JavaScript error.
Long Nguyen
ModeratorHi,
Please see my screen record https://www.loom.com/share/ca767d5c1d8c46e9bc073eb042d5f67e.
The map shows the address field as well after saving and refreshing the page. Make sure you are using the latest version of Meta Box plugin v5.3.0 and please take a screen record of this problem. I will take a closer look and give a quick response.
Long Nguyen
ModeratorHi,
The shortcode supports an attribute
user_idto update the specific user ID, you can pass the ID to edit the user profile in the frontend.[mb_user_profile_info id="user_profile_role" user_id=5]You can also update the user role in the frontend with a custom field, please follow my sample code and this screen record
function register_user_profile_fields($meta_boxes) { $prefix = 'user_profile_'; $meta_boxes[] = [ 'id' => $prefix . 'role', 'title' => 'Update user role', 'type' => 'user', 'fields' => [ [ 'name' => 'Custom user role', 'id' => 'role', // Must use 'role' 'type' => 'select', 'options' => array( 'administrator' => 'Administrator', 'editor' => 'Editor', 'contributor' => 'Contributor' ) ], ], ]; return $meta_boxes; } add_action( 'rwmb_meta_boxes', 'register_user_profile_fields',2, 1); add_action( 'rwmb_profile_after_process', function( $config, $user_id ) { $role = rwmb_meta( 'role', array( 'object_type' => 'user' ), $user_id ); wp_update_user( array( 'ID' => $user_id, 'role' => $role ) ); }, 99, 2 );For more information about user role, please follow the documentation.
https://wordpress.org/support/article/roles-and-capabilities/#rolesLong Nguyen
ModeratorThank you, I will check it out and let you know later.
Long Nguyen
ModeratorOk, I've created a feature request to support adding a new option to the list options if the text does not available in the current list options.
Long Nguyen
ModeratorHi,
With the Validation module, after clicking to the button Save on the first time, the function validation will be triggered and show the error message if the input does not meet the requirement. Then it shows the error when the user types input value immediately.
For more information, please follow the documentation.
https://docs.metabox.io/validation/
https://jqueryvalidation.org/Long Nguyen
ModeratorHi,
We have the extension MB Tooltip supports to create the tooltip for the field. You can use the custom attribute in the MB Builder to add the tooltip for the field. Please see my screenshot https://share.getcloudapp.com/5zu1l9l8 and refer to this topic https://support.metabox.io/topic/feature-request-builder-date-format/.
Long Nguyen
ModeratorHi,
Could you please share full the code to create the field
WYSIWYG? I will copy your code and check on my end.Here is my sample code
function your_prefix_get_meta_box( $meta_boxes ) { $prefix = 'prefix-'; $meta_boxes[] = array( 'id' => 'untitled', 'title' => esc_html__( 'Untitled Metabox', 'metabox-online-generator' ), 'post_types' => array('post', 'page' ), 'context' => 'advanced', 'priority' => 'default', 'autosave' => 'false', 'fields' => array( array( 'id' => $prefix . 'wysiwyg_1', 'name' => esc_html__( 'WYSIWYG', 'metabox-online-generator' ), 'type' => 'wysiwyg', 'options' => array( 'tinymce' => array( 'toolbar1' => 'bold,italic', 'toolbar2' => '', 'toolbar3' => '', ), ), ), ), ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'your_prefix_get_meta_box' );and it works as well https://share.getcloudapp.com/rRu9xWm1.
Long Nguyen
ModeratorHi,
The HTML5 input type
numberaccepts the characterewhere the exponent is the number after the e or E, for example, 10e2 = 1000 but it isn't supported to save.For more information, please follow some guides.
https://www.filamentgroup.com/lab/type-number.html
https://stackoverflow.com/questions/31706611/why-does-the-html-input-with-type-number-allow-the-letter-e-to-be-entered-in
https://html.spec.whatwg.org/multipage/forms.html#number-state-(type=number)Long Nguyen
ModeratorHi,
Got it. I'm going to create a feature request to support a search box on the code builder. Please keep the plugin up to date, it will be wrapped on the future release.
Long Nguyen
ModeratorHi,
Thank you for pointing this out. Let's wait for the response of Yoast developers if they won't fix this issue, I will open an issue for our developer team to cover this case.
-
AuthorPosts