Support MB User Profile [MB User Profile] Show password meter on registration form Reply To: [MB User Profile] Show password meter on registration form

#13218
Content PilotContent Pilot
Participant

I followed this tutorial on how to attach the strength meter to the form.

https://code.tutsplus.com/articles/using-the-included-password-strength-meter-script-in-wordpress--wp-34736

I also add this function to echo the span for the JS to bind to.

add_action( 'rwmb_profile_before_submit_button', 'password_strength_meter_field' );
function password_strength_meter_field( $config ) {
  if ( 'register-form' === $config['form_id'] ) {
    echo '<span id="password-strength"></span>';
  }
}