turn off form auto complete
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.
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);
break;
case "PASSWORDRECOVERY":
// do any password recovery initialization
break;
case "CHANGEPASSWORD":
// do any change password initialization
break;
case "REGISTER":
// do any register initialization
break;
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);
Regards,
Ivan Dimitrov
the Telerik team
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
http://knowledgebase.progress.com/articles/Article/Disable-browser-autocomplete-for-login-fields