I am using the registration snippet within Umbraco settings.
I would like to remove the Name field. If I comment out the field I receive the following error when creating a new member “Cannot save member with empty name.”
Open to ideas...
A simple option would be to fill in the name field with some spoofed value. For my applications, clients usually want "FirstName" and "LastName" and tend not to want a "username". I simply add a JavaScript snippet that sets the form's onsubmit method to a function that grabs the FirstName and LastName fields, concatenates their values, and sets the "Name" input to that value (e.g. "FirstName_LastName").
Another option is to create your own model+controller for login, although that is significantly more complex.
The simplest option is just to give the "Name" field a null value and hide it:
@Html.HiddenFor(m => registerModel.Name, new { @Value = "spoofValue" })
Registration snippet
I am using the registration snippet within Umbraco settings. I would like to remove the Name field. If I comment out the field I receive the following error when creating a new member “Cannot save member with empty name.” Open to ideas...
A simple option would be to fill in the name field with some spoofed value. For my applications, clients usually want "FirstName" and "LastName" and tend not to want a "username". I simply add a JavaScript snippet that sets the form's
onsubmit
method to a function that grabs the FirstName and LastName fields, concatenates their values, and sets the "Name" input to that value (e.g. "FirstName_LastName").Another option is to create your own model+controller for login, although that is significantly more complex.
The simplest option is just to give the "Name" field a null value and hide it:
is working on a reply...