Password strength with password type field on registration On my site, I have 10 different registration forms it means altered register form 10+ times and added different field on different scenarios. So on another new registration form, I have to remove confirm password field as it was required according to design so I did this way.

function HOOK_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  switch ($form_id) {
    case 'user_register_form':
     $form['account']['pass']['#type'] = 'password';
    break;
  }
}


So, as core's functionality we have password strength with the confirm_password field on registration and by changing confirm_password field type to password it also removes password strength that I really need with password field.

Is there any way to do that?
You can do this with jQuery, something like this should work.

$(document).ready(function () {
  $('.password-field').blur(function () {
    $('.password-comfirm').val($(this).val());
    $('.password-comfirm').hide();
  });
});