Radio Button on Registration Form
Hi,
We have extended Basic user profile with a custom field Gender and we use multiple-choice (radio button) for this field. We are now trying to insert this field into the registration template, but we are not able to display this field as a radio button. Can anyone advice how we should modify registration widget template to make this working?
Thanks
Hello Igor,
You can achieve the desired functionality by editing the template of the Registration form. You can do this by following these steps:
1)Drag the Registration widget on the page
2)Press “Edit”
3)Select template for “Registration form template” and press “Edit template”
4)Add the following snippet to the template
<
sitefinity:ChoiceField
id
=
"Choices"
runat
=
"server"
DisplayMode
=
"Write"
RenderChoicesAs
=
"RadioButtons"
DataItemType
=
"Telerik.Sitefinity.Security.Model.SitefinityProfile"
DataFieldName
=
"Gender"
>
<
Choices
>
<
sitefinity:ChoiceItem
Text
=
"Male"
value
=
"Male"
></
sitefinity:ChoiceItem
>
<
sitefinity:ChoiceItem
Text
=
"Female"
value
=
"Female"
></
sitefinity:ChoiceItem
>
</
Choices
>
</
sitefinity:ChoiceField
>
Please have in mind that DataFieldName should be exactly the same as your custom field name and the values of the ChoiceItems should match the values that you have defined for the custom field.
5)Save changes.