Radio Button on Registration Form

Posted by Community Admin on 04-Aug-2018 09:11

Radio Button on Registration Form

All Replies

Posted by Community Admin on 10-Oct-2014 00:00

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

Posted by Community Admin on 13-Oct-2014 00:00

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.


Regards,
Elena Ganeva
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed