+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Removing username textbox from Registration form

Removing username textbox from Registration form

3 posts, 1 answered
  1. Alex
    Alex avatar
    5 posts
    Registered:
    19 Mar 2014
    19 Mar 2015
    Link to this post

    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?

     

  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    19 Mar 2015 in reply to Alex
    Link to this post

    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/

    Answered
  3. Alex
    Alex avatar
    5 posts
    Registered:
    19 Mar 2014
    19 Mar 2015 in reply to Steve
    Link to this post

    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

3 posts, 1 answered