More in this section

Forums / Developing with Sitefinity / Registration form field default to ticked

Registration form field default to ticked

1 posts, 0 answered
  1. Ben
    Ben avatar
    1 posts
    08 Dec 2011
    21 Mar 2012
    Link to this post

    I'm trying to add a "Subscribe to Newsletter" checkbox to the registration form widget, but need the box to be ticked by default. I have the following code in the template:

    <sitefinity:ChoiceField id="chkNewsletter" runat="server" DisplayMode="Write" RenderChoicesAs="SingleCheckBox" DataItemType="Telerik.Sitefinity.Security.Model.SitefinityProfile" DataFieldName="NewsletterSignup">
            <sitefinity:ChoiceItem Text="I would like to receive the  newsletter" value="Yes"></sitefinity:ChoiceItem>

    And have added a Yes/No field named 'NewsletterSignup' to the Profile. Can anyone tell me how I can get this ChoiceItem to be ticked by default?

    Thanks in advance.
1 posts, 0 answered