Forum Replies Created
-
AuthorPosts
-
May 19, 2025 at 6:48 PM in reply to: MetaBox 5.10.9 breaks password reveal icon on change password form #48282
Johannes Gross
ParticipantThanks for checking! Yes, I deactivated the Meta Box plugin and all the Meta Box add-ons. I am using only Meta Box AIO. But the password reveal icons are still not showing: https://scholarships.bocagrandewomansclub.org/
May 18, 2025 at 12:10 AM in reply to: MetaBox 5.10.9 breaks password reveal icon on change password form #48275Johannes Gross
ParticipantI switched to Meta Box AIO and disabled all the other Meta Box extensions but the password field when logging in or changing the password still has the icon missing: https://scholarships.bocagrandewomansclub.org/
Can you take another look?
March 25, 2025 at 1:32 AM in reply to: Login Form Forgotten Password link does not have a password strength #47909Johannes Gross
ParticipantI came across the same observation today - the MB reset password form does not enforce any strength. Please fix this. The strange thing is that your LoginForm render_block code even has the provision for it but the password_strength value does not get populated since the field is missing in the Gutenberg block.
public function render_block( $attributes ): string { $form = Factory::make( [ 'redirect' => $attributes['redirect'], 'form_id' => $attributes['form_id'], 'recaptcha_key' => $attributes['recaptcha_key'], 'recaptcha_secret' => $attributes['recaptcha_secret'], 'label_title' => $attributes['label_title'], 'label_username' => $attributes['label_username'], 'label_password' => $attributes['label_password'], 'label_remember' => $attributes['label_remember'], 'label_lost_password' => $attributes['label_lost_password'], 'label_submit' => $attributes['label_submit'], 'id_username' => $attributes['id_username'], 'id_password' => $attributes['id_password'], 'id_remember' => $attributes['id_remember'], 'id_submit' => $attributes['id_submit'], 'confirmation' => $attributes['confirmation'], 'value_username' => $attributes['value_username'], 'value_remember' => Helper::convert_boolean( $attributes['value_remember'] ), 'password_strength' => $attributes['password_strength'], ], 'login' ); if ( empty( $form ) ) { return ''; }I appreciate your help with this!
Johannes Gross
ParticipantThank you!
Johannes Gross
ParticipantThank you! I appreciate it.
Johannes Gross
ParticipantHi Peter,
Thank you for your patience with my reply, I just created a fresh WordPress install and added MetaBox and MB Blocks 1.5.1.
Then, I added the code below (as a custom plugin) to set up a simple metabox display:function twt_metabox_io_blocks($meta_boxes) { $meta_boxes[] = array( 'id' => 'twt-product-module', 'title' => 'TWT Product Module', 'type' => 'block', 'icon' => 'editor-table', 'category' => 'layout', //'context' => 'side', 'render_callback' => 'twt_render_product_module', 'supports' => array( 'anchor' => true, 'customClassName' => true, 'align' => ['full','wide'], ), 'fields' => array( array( 'name' => 'Price', 'id' => 'price', 'type' => 'text', ) ) ); return $meta_boxes; } function twt_render_product_module( $attributes): void { // Fields data. if ( empty( $attributes['data'] ) ) { return; } // Custom CSS class name. $class = 'twt-product-module ' . ( $attributes['className'] ?? '' ); if ( ! empty( $attributes['align'] ) ) { $class .= " align{$attributes['align']}"; } ?> <div class="<?= trim($class); ?>"> Price in $: <?php echo $attributes['data']['price']; ?> </div> <?php } add_action('rwmb_meta_boxes', 'twt_metabox_io_blocks');When I enter $99 as the field value, I get the following output: Price in \$: \$99
When I downgrade MB Blocks to version 1.4.2 the backslashes don't show.
I will submit the login credentials through the contact form shortly.
Thank you!
Johannes Gross
ParticipantThank you for looking into this. The price field is just a regular text field. Here is the code:
$meta_boxes[] = array( 'id' => 'twt-product-modules', 'title' => 'TWT Product Modules', 'type' => 'block', 'icon' => 'editor-table', 'category' => 'layout', //'context' => 'side', 'render_template' => get_stylesheet_directory() . '/blocks/twt-product-modules.php', 'supports' => array( 'anchor' => true, 'customClassName' => true, 'align' => ['full','wide'], ), 'fields' => array( array( 'name' => '', 'id' => 'modules', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'default_state' => 'collapsed', 'group_title' => '{name}', 'fields' => array( array( 'name' => 'Name', 'id' => 'name', 'type' => 'text', ), array( 'name' => 'Price', 'id' => 'price', 'type' => 'text', ), array( 'name' => 'Button Label', 'id' => 'btn_label', 'type' => 'text', ), array( 'name' => 'Module URL', 'id' => 'btn_url', 'type' => 'text', ), array( 'name' => 'Image', 'id' => 'img', 'desc' => '472 by 306 pixels', 'type' => 'single_image', ) ), ), ) );<?php $attr = $attributes; if ( empty( $attr['data'] ) ) { return; } // Assign anchor if available $id = $attr['anchor'] ?? ''; // Custom CSS class name. $class = trim('twt-product-modules ' . ( $attr['className'] ?? '' )); if ( ! empty( $attr['align'] ) ) { $class .= " align{$attr['align']}"; } if ( ! empty( $attr['data']['modules'] ) ) { ?> <div<?= empty($id) ? '' : ' id="'.esc_attr($id).'"'; ?><?= empty( $class ) ? '' : ' class="'.esc_attr($class). '"'; ?>> <ul class="row twt-product-modules-row"> <?php foreach($attr['data']['modules'] as $module) { ?> <li class="col-3 col-t-4 col-m-6"> <?php if(empty($module['btn_url'])) { ?><div class="twt-product-module"><?php } else { ?><a href="<?= $module['btn_url']; ?>" class="twt-product-module"><?php } ?> <?= wp_get_attachment_image($module['img'], 'medium_large', false, array('class' => 'img', 'alt' => '')); ?> <div class="content"> <h3 class="name"><strong><?= $module['name']; ?><?php if(!empty($module['price'])) { ?>:</strong> <?= $module['price']; ?> <?php } else { ?> </strong> <?php } ?> </h3> <?php if(!empty($module['btn_label'])) { ?> <p class="btn-c"><span class="btn small"><?= $module['btn_label']; ?></span></p> <?php } ?> </div> <?php if(!empty($module['btn_url'])) { ?></a><?php } else { ?></div><?php } ?> </li> <?php } ?> </ul> </div> <?php }Also, on a different site, I just ran into the same issue after upgrading to MB Blocks 1.5.0. A \ is added before $ signs. But this time, in my block render callback function. It affected my JS code that is included in the render_callback function (see below for how it added \ before $). After downgrading to MB Blocks 1.4.2 the \$ were no longer added.
<script> jQuery(function(\$) { let hccf_dtable = \$('#households-table').DataTable({Let me know if you need more information.
March 24, 2024 at 2:59 AM in reply to: ✅mbct_before_update - want to identify if a field has changed #44979Johannes Gross
ParticipantI am experiencing the same PHP Fatal error as Ben R when adding a new element to a model after updating to version 2.1.9. I then restored version 2.1.8 and it is working again without any issues.
Johannes Gross
ParticipantThank you!
Johannes Gross
ParticipantThank you!
August 31, 2020 at 9:25 PM in reply to: ✅Duplicate confirmation message when you have multiple mb_user_profile_info on on #21561Johannes Gross
ParticipantThat makes sense. However, when I tried it, this also require the logged in user to also write in their password (twice) to be able to update their e.g. first name.
<?= do_shortcode('[mb_user_profile_info id="twt-public-profile" form_id="twt-edit-profile" label_submit="Update Profile" confirmation="Your profile has been updated successfully. Thank you."]'); ?> <h2>Set a New Password</h2> <?= do_shortcode('[mb_user_profile_info id="rwmb-user-info" password_strength="very-weak" label_submit="Update Password" confirmation="Your password has been updated. Thank you."]'); ?>August 29, 2020 at 2:54 AM in reply to: ✅Duplicate confirmation message when you have multiple mb_user_profile_info on on #21514Johannes Gross
ParticipantAny update on this? I am having the same issue.
August 26, 2020 at 2:37 AM in reply to: ✅Registration: username as email, duplicated fields, avatar, visibility issue #21465Johannes Gross
ParticipantI was able to display the first_name and last_name field above the email address by using the following code:
function add_more_registration_fields($fields) { $new_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 ], ]; $fields = array_merge( $new_fields, $fields ); return $fields; } add_filter( 'rwmb_profile_register_fields', 'add_more_registration_fields'));Johannes Gross
ParticipantThank you Long for your reply! Switching the title and content from within the shortcode to the custom metabox did the trick. 🙂
Johannes Gross
ParticipantThank you Anh!
-
AuthorPosts