• Resolved Ashot2oo1

    (@ashot2oo1)


    Hello all,

    I am trying to achieve the following ->
    When I am entering a weak password in the fiels during registration I get the correct error message stating that I need to make the passwrod strong. However, when I start typing in a new password the message doesn’t clear until I submit the form, instead the message should be cleared as soon as I type in a new password.

    Is there any options to set the form to work dynamically instead of page reload?

    You can see this https://solartrainingacademy.com/become-a-student/ here, in the password field you can type in just numbers to reproduce the error.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @ashot2oo1

    You can try this javascript code snippet to clear the error when changing or entering data to the fields:

    jQuery(document).on("ready", function() {
       jQuery(".um-field input, .um-field textarea, .um-field select").on("keypress", function() {
          var me = jQuery(this);
    
          me.parent(".um-field-area")
             .parent(".um-field")
             .find(".um-field-error")
             .hide();
       });
    
       jQuery(".um-field select").on("select2:select", function() {
          var me = jQuery(this);
    
          me.parent(".um-field-area")
             .parent(".um-field")
             .find(".um-field-error")
             .hide();
       });
    
       jQuery(".um-field input[type='radio'], .um-field input[type='checkbox']").on("change", function() {
          var me = jQuery(this);
    
          if (me.is(":checked")) {
             me.parent(".um-field-radio, .um-field-checkbox")
                .parent(".um-field-area")
                .parent(".um-field")
                .find(".um-field-error")
                .hide();
          }
       });
    
       jQuery(".um-field a[data-modal='um_upload_single'], .um-field .um-datepicker, .um-field .um-timepicker").on("click", function() {
          var me = jQuery(this);
    
          me.parent(".um-field-area")
             .parent(".um-field")
             .find(".um-field-error")
             .hide();
       });
    });

    You can use this plugin to add the javascript to your site:
    https://ww.wp.xz.cn/plugins/custom-css-js/

    Regards,

    Thread Starter Ashot2oo1

    (@ashot2oo1)

    @champsupertramp This worked perfectly well!

    Thank you very much for your help!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @ashot2oo1

    Thanks for letting us know.

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Dynamically clear strong password error message’ is closed to new replies.