Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Yes, it is possible to use the frontend dashboard to edit the custom post type. On the page with ID 256, you need to add the frontend submission shortcode
[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="cpt-slug"]Remember to change the
cpt-slugwith your post type slug. Refer to this topic https://support.metabox.io/topic/dashboard-not-working/#post-29143Let me know how it goes.
January 10, 2022 at 8:27 AM in reply to: ✅Unable to reposition the 'user_pass' field inside the user register form #33109Long Nguyen
ModeratorHi,
On the documentation, we do not mention that the user registration form can be edited with a meta box and default fields, it is located under the user profile form. That means it is not possible to use one meta box for two forms like that.
If you want to add more custom fields to the registration form or re-order fields, please use the filter above.
add_filter( 'rwmb_profile_register_fields', function( $fields ) { $fields = [ '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, ], 'username' => [ 'name' => __( 'Username', 'mb-user-profile' ), 'id' => 'user_login', 'type' => 'text', 'required' => true, ], 'display_name' => [ 'name' => __( 'Display Name', 'mb-user-profile' ), 'id' => 'display_name', 'type' => 'text', ] ]; return $fields; } );January 10, 2022 at 8:14 AM in reply to: rwmb_frontend_validate and custom fields with Ajax Issues #33108Long Nguyen
ModeratorHi,
The form disappears when the validation is not passed if you enable ajax. I will inform the development team to consider improving this case. Thanks.
Long Nguyen
ModeratorHi,
That means on the page that has the shortcode frontend submission, you need to add the
post_typeattribute, not the shortcode frontend dashboard. Refer to the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributesLong Nguyen
ModeratorHi,
You need to add the attribute
post_typeand assign the post type slug in the frontend submission shortcode to edit this post type on the frontend dashboard page.[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="cpt-slug"]Long Nguyen
ModeratorHi,
When creating the validation message for the field, you can use the function
gettextto make the message translatable. For example:'validation' => [ 'rules' => [ 'field_id' => [ 'required' => true, ], ], 'messages' => [ 'field_id' => [ 'required' => __( 'Password is required', 'your-text-domain' ) ], ], ],Refer to the documentation https://codex.wordpress.org/I18n_for_WordPress_Developers
Long Nguyen
ModeratorHi,
Relate to this topic https://support.metabox.io/topic/unable-to-reposition-the-user_pass-field-inside-the-user-register-form/
You can use the Tooltip or field setting desc to add the hint/description for the password field.
Long Nguyen
ModeratorHi,
Thank you for your feedback.
There is an issue with MB Tabs and I've escalated this to the development team. It will be fixed in the next update as soon as possible.
January 9, 2022 at 5:52 PM in reply to: ✅Unable to reposition the 'user_pass' field inside the user register form #33087Long Nguyen
ModeratorHi,
The default fields here https://docs.metabox.io/extensions/mb-user-profile/#edit-default-fields
is used for the user profile shortcode, not for the user register shortcode.If you want to modify the fields of the user register shortcode, please use the filter
rwmb_profile_register_fields. For example:add_filter( 'rwmb_profile_register_fields', function( $fields ) { $fields = [ '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, ], 'username' => [ 'name' => __( 'Username', 'mb-user-profile' ), 'id' => 'user_login', 'type' => 'text', 'required' => true, ], ]; return $fields; } );Refer to the documentation https://docs.metabox.io/extensions/mb-user-profile/#form-fields-filters
Long Nguyen
ModeratorHi Jack,
Yes, it is possible. You can create a custom query to order posts by meta key
mbfp_count. Read more on the documentation
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parametersIn the Oxygen builder, please contact their support to ask for implementing the query.
January 9, 2022 at 5:00 PM in reply to: rwmb_frontend_validate and custom fields with Ajax Issues #33083Long Nguyen
ModeratorHi,
It's the default behavior of the frontend form validation because it is validated on the backend (server), all the input values will be cleared.
You can use field validation to use JS validate with the setting
remoteto create a request for server-side validation (Ajax). Read more on the documentation
https://docs.metabox.io/validation/and refer to this topic https://support.metabox.io/topic/remote-validation-example/
January 9, 2022 at 4:45 PM in reply to: ✅Is it possible to use twig without using the MB Builder to create blocks? #33082Long Nguyen
ModeratorHi Kyle,
I've not used the Twig engine in a PHP file to create the block before but you can try to use the setting
render_templateto include the Twig file path.Refer to this article https://www.sitepoint.com/twig-popular-stand-alone-php-template-engine/
and this documentation https://docs.metabox.io/extensions/mb-blocks/#render_templateLong Nguyen
ModeratorHi Daniel,
If you are using the Builder, please use the option "Custom HTML5 attributes" to add the class for the button. Screenshot https://share.getcloudapp.com/mXuJmeXJ
Refer to the documentation https://docs.metabox.io/fields/button/
January 7, 2022 at 8:59 PM in reply to: ✅Mailto: and tel: links in Meta Box Field Group in Oxygen #33060Long Nguyen
ModeratorHi Patrik,
Please refer to this topic to show the URL (link) field with coding https://support.metabox.io/topic/using-url-field-type/
In Oxygen builder, please contact Oxygen support to ask for help with this case.
Long Nguyen
ModeratorHi,
Which posts do you mention? Just assign the field group to the post type as the ACF does.
-
AuthorPosts