We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1783
    • 23 Posts
    I’ve got problem with ’edit profile’ form with saved user’s password by a browser (checked in Firefox and Chrome) . On the Edit Profile page password gets automatically filled in the first password field and after changing other details and clicking ’Save’ the form is not submitted cause password fields do not match (one is auto-filled by browser, one is blank). This will be very confusing for users, as they won’t probably realise that, and the only way to save the form is by deleting autofilled data.

    There is problem with username too, I do not allow them to change their username, so this field is not visible, but somehow username gets put into value of first random field that is not filled out, like in my case in Zip Code. So when the form is submitted, Zip Code in database change to username value, which is unacceptable.

    Is there any way to prevent browsers to autofill user details in Edit Profile page?

    I am accessing profile page by type=`profile` from custom created link in sidebar.

    Can anyone help please, I’m struggling with this for long time now, and can’t find any answer anywhere.
      • 4310
      • 2,310 Posts
      That normally happens because you’re browser has saved your manager login details for the domain.
      So when you go to the front end of the site Firefox or Chrome auto-fill them in.
      Shouldn’t be a problem for your users.
      • Add autocomplete=’off’ to your fields. It won’t validate XHTML, but sometimes the "standards" are just stupid.

        If you really have to validate, you can use javascript:
        someForm.setAttribute( "autocomplete", "off" ); someFormElm.setAttribute( "autocomplete", "off" );
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org