Removing username textbox from Registration form

Posted by Community Admin on 04-Aug-2018 22:12

Removing username textbox from Registration form

All Replies

Posted by Community Admin on 19-Mar-2015 00:00

My requirement is to make users register and log-in using their e-mail address. As such there is no need for the username textbox and I wanted to remove it

To do this, I added a Registration widget - created a new template and removed the username field in the template editor. However, now when I register I get the following error:-

A required control was not found in the template for "~/SfCtrlPresentation/OpenAccessDataProvider,10010c9acae763229971ff0000979a84.ascx". The control must be assignable from type "Telerik.Sitefinity.Web.UI.Fields.TextField" and must have ID "userName".

 

I am assuming that this is because the logic behind the default control is looking for the userName control to perform validation.

 

What is the recommended approach for removing the username from the Registration widget and getting users to use their e-mail address as login? Is it a custom control or something else?

 

Posted by Community Admin on 19-Mar-2015 00:00

Keep it there, just hide it with Css, then wire up some jQuery such that on the blur event of the email input it will "copy" that text into the invisible username input.  Nobody will be the wiser!

 

https://api.jquery.com/blur/

Posted by Community Admin on 19-Mar-2015 00:00

That option had occurred to me and it is looking like the way to go - although not quite what I was expecting

 As I'm quite new to Sitefinity I'm still trying to get a handle on when you should use a custom widget or edit the existing template etc

This thread is closed