turn off form auto complete

Posted by Community Admin on 03-Aug-2018 00:38

turn off form auto complete

All Replies

Posted by Community Admin on 10-May-2011 00:00

We have a client that for security reasons doesn't want the login form to allow browsers to store auto complete data. So we need to put the attribute autocomplete="off" on the form. How do we go about doing that? Ideally we would like to do this site wide for both the front and backend. For the front end it looks like I can just change a masterpage. But for the login and backend, I can't see what to change.

Posted by Community Admin on 10-May-2011 00:00

Hello Brian,
It would be hard to replace the backend login form and add the attribute you want.
You need to inject a custom handler inside RegisterRoutes method ofTelerik.Sitefinity.Abstractions.Bootstraper. You should create a custom class that inherits from LoginRouteHandler and add your logic inside InitializeHttpHandler. There you need to register your custom login

          var projectName = handler.FindControl("ProjectName") as ITextControl;
            if (projectName != null)
                projectName.Text = Config.Get<ProjectConfig>().ProjectName;

            switch (view)
                case "AJAX":
                case "LOGIN":
                case "DOLOGOUT":
                    SetLoginLogoutFromsCustom(handler, requestContext, this.view);
                case "PASSWORDRECOVERY":
                    // do any password recovery initialization
                case "CHANGEPASSWORD":
                    // do any change password initialization
                case "REGISTER":
                    // do any register initialization

private static void SetLoginLogoutFroms(Page handler, RequestContext requestContext, string view)
            var loginForm = handler.FindControl("LoginForm");
            if (loginForm == null)
                throw new TemplateException(LoginTemplate, "System.Web.UI.PlaceHolder", "LoginForm");
            var logoutForm = handler.FindControl("LogoutForm");
            if (logoutForm == null)
                throw new TemplateException(LoginTemplate, "System.Web.UI.PlaceHolder", "LogoutForm");


public const string LoginTemplate = "Telerik.Sitefinity.Samples.Templates.CustomLogin.aspx";
Finally the custom route should be registered inside the Global.asax

Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(this.AfterInit);

Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 09-Sep-2016 00:00

There is now a setting to change the login form.  (I am running 8.2)

In order to disable the browser autofill for the login fields perform the below steps
Login to the Sitefinity backend
Navigate to Administration -> Settings -> Advanced Settings -> Login
Check the Disable browser autocomplete checkbox



This thread is closed