Hi I found a snippet within Umbraco that helps with registering members, While the out of the box properties are saved upon creation the custom properties are visible on the frontend but are not saved upon submit.
I'm pretty sure some people are familiar as i found multiple posts on this however no solutions so far.
using (Html.BeginUmbracoForm<UmbRegisterController>("HandleRegisterMember"))
{
<fieldset>
<legend>Register Member</legend>
@Html.ValidationSummary("registerModel", true)
@Html.LabelFor(m => registerModel.Name)
@Html.TextBoxFor(m => registerModel.Name)
@Html.ValidationMessageFor(m => registerModel.Name)
<br />
@Html.LabelFor(m => registerModel.Email)
@Html.TextBoxFor(m => registerModel.Email)
@Html.ValidationMessageFor(m => registerModel.Email)
<br />
@Html.LabelFor(m => registerModel.Password)
@Html.PasswordFor(m => registerModel.Password)
@Html.ValidationMessageFor(m => registerModel.Password)
<br />
@if (registerModel.MemberProperties != null)
{
@*
It will only displays properties marked as "Member can edit" on the "Info" tab of the Member Type.
*@
for (var i = 0; i < registerModel.MemberProperties.Count; i++)
{
@Html.LabelFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Name)
@*
By default this will render a textbox but if you want to change the editor template for this property you can
easily change it. For example, if you wanted to render a custom editor for this field called "MyEditor" you would
create a file at ~/Views/Shared/EditorTemplates/MyEditor.cshtml", then you will change the next line of code to
render your specific editor template like:
@Html.EditorFor(m => registerModel.MemberProperties[i].Value, "MyEditor")
*@
if (registerModel.MemberProperties[i].Alias.ToLower().Contains("jobposter") || registerModel.MemberProperties[i].Alias.ToLower().Contains("jobseaker"))
{
@Html.EditorFor(m => registerModel.MemberProperties[i], "CheckboxEditor")
}
else
{
@Html.EditorFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Alias)
}
@Html.HiddenFor(m => registerModel.MemberProperties[i].Alias)
<br />
}
}
@Html.HiddenFor(m => registerModel.MemberTypeAlias)
@Html.HiddenFor(m => registerModel.RedirectUrl)
@Html.HiddenFor(m => registerModel.UsernameIsEmail)
<button>Register</button>
</fieldset>
}
Umbraco REgistration control 'UmbRegisterController' issue with registering custom data
Hi I found a snippet within Umbraco that helps with registering members, While the out of the box properties are saved upon creation the custom properties are visible on the frontend but are not saved upon submit.
I'm pretty sure some people are familiar as i found multiple posts on this however no solutions so far.
}
[Update] Kindly visit the following link for an answer: https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/56980-RegisterModelMemberProperties-empty
is working on a reply...