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
    Registered:
    08 Dec 2011
    21 Mar 2012
    Link to this post
    Hi,

    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">
        <Choices>
            <sitefinity:ChoiceItem Text="I would like to receive the  newsletter" value="Yes"></sitefinity:ChoiceItem>
       </Choices
    </sitefinity:ChoiceField>

    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