Registration form field default to ticked

Posted by Community Admin on 04-Aug-2018 13:27

Registration form field default to ticked

All Replies

Posted by Community Admin on 21-Mar-2012 00:00

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.

This thread is closed