• Resolved Selah

    (@tubescreamer)


    Hi, I am not sure why, but the password field in the Account tab is constantly auto filled for me. Is there a way to prevent this? For security measures, the password field in the account and change password tab shouldn’t always have a value.

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

    (@champsupertramp)

    Hi @tubescreamer

    Please try adding this javascript to your theme/customizer:

    jQuery("input[type=password]").attr("autocomplete","off");

    Regards,

    Thread Starter Selah

    (@tubescreamer)

    I did, it shows that autocomplete is set to off for the field in inspect element but for some reason the password still autofills in the field even after I remove the password from the field and refresh the page.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @tubescreamer

    What’s your browser that auto-fills the password fields?

    Could you please try this one with a random autocomplete value?

    jQuery("input[type=password]").attr("autocomplete","new-password");

    Regards,

    Thread Starter Selah

    (@tubescreamer)

    Adding that code seemed to stop the password field from autocompleting in the Account tab. Note, it only autocompleted in the Account tab, not the change password tab. I am using Google Chrome Version 92.0.4515.131 on Mac OSX.

    Should I keep that code in my custom javascript file?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @tubescreamer

    You can keep the script to stop the autocomplete issue.

    Regards,

    Thread Starter Selah

    (@tubescreamer)

    Okay, but based on this: https://web.dev/sign-in-form-best-practices/

    The code you’ve provided will add the autocomplete=”new-password” attribute to every password field on the site, when it should only be affecting password fields for sign-up forms or password reset forms, or in my case, the password field in the Account > General form of UM Woo. Is there any way I could target just this field, maybe using the class/id?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @tubescreamer

    You can use the browser inspect element to check the form’s ID/Class and then add it to the script if you need to trigger it for a specific form.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Password field in Account tab is autofilled’ is closed to new replies.