Try Now
More in this section

Forums / General Discussions / turn off form auto complete

turn off form auto complete

3 posts, 0 answered
  1. Brian Crosby
    Brian Crosby avatar
    29 posts
    02 Jan 2006
    10 May 2011
    Link to this post
    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.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    10 May 2011
    Link to this post
    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
  3. Mark Hazleton
    Mark Hazleton avatar
    0 posts
    19 Nov 2015
    09 Sep in reply to Brian Crosby
    Link to this post

    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



3 posts, 0 answered