Get member property description to display in RegisterMember macro
Got the registration all working perfectly, but I want to display the description for a custom member property on the form as help text; I can't see a way of doing that as the MemberPropertyModel doesn't have much on it?
<div class="register-field">
@Html.LabelFor(m => registerModel.MemberProperties[i].Value, registerModel.MemberProperties[i].Name)
**@registerModel.MemberProperties[i].Description** THIS BIT DOESN'T WORK
<input asp-for="@registerModel.MemberProperties[i].Value" class="form-control" />
@Html.HiddenFor(m => registerModel.MemberProperties[i].Alias)
<span asp-validation-for="@registerModel.MemberProperties[i].Value" class="form-text text-danger"></span>
</div>
I would add a string to the dictionary and use that, the property descriptions are really meant for telling back office users about the property rather than displaying in the front-end
Great, thanks! That works. Went to Translation, created a dictionary item to identify the string by the property type alias (e.g. Help/Registration/nickname) and add this to the loop that gets the custom properties:
Get member property description to display in RegisterMember macro
Got the registration all working perfectly, but I want to display the description for a custom member property on the form as help text; I can't see a way of doing that as the MemberPropertyModel doesn't have much on it?
Hi Rob,
You could inject the IMemberTypeService and do the following
personally I wouldn't do this :)
I would add a string to the dictionary and use that, the property descriptions are really meant for telling back office users about the property rather than displaying in the front-end
Great, thanks! That works. Went to Translation, created a dictionary item to identify the string by the property type alias (e.g.
Help/Registration/nickname
) and add this to the loop that gets the custom properties:Exactly what I do :)
is working on a reply...