+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Radio Button on Registration Form

Radio Button on Registration Form

2 posts, 0 answered
  1. Igor
    Igor avatar
    39 posts
    Registered:
    17 Jul 2012
    10 Oct 2014
    Link to this post

    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

  2. Elena Ganeva
    Elena Ganeva avatar
    36 posts
    Registered:
    20 Jul 2016
    13 Oct 2014
    Link to this post

    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
     
2 posts, 0 answered