1. Trizz

    Trizz - Jan 11, 2015 New Member

    Credit
    Point
    How can I check Subscribe to newsletter by default?
     
    Loading...
  2. Brivium

    Brivium - Jan 14, 2015 XenForo Services Staff Member

    Credit
    Point
    Dear Sir/Madam,

    To get subscribe checked by default, you can open template BRMI_register_form and find
    Code:
                    <li><label for="ctrl_brmi_subscribe"><input type="checkbox" name="brmi_subscribe" value="1" id="ctrl_brmi_subscribe" {xen:checked "{$brmiSubscribe}"} /> {xen:phrase subscribe}</label></li>
    
    Change to
    Code:
                    <li><label for="ctrl_brmi_subscribe"><input type="checkbox" checked="check" name="brmi_subscribe" value="1" id="ctrl_brmi_subscribe" {xen:checked "{$brmiSubscribe}"} /> {xen:phrase subscribe}</label></li>
    
    Regards,
     
    #2
  3. Trizz

    Trizz - Jan 15, 2015 New Member

    Credit
    Point
    is there any way to make this a selectable option?
     
    Brivium likes this.
    #3
  4. Brivium

    Brivium - Jan 15, 2015 XenForo Services Staff Member

    Credit
    Point
    Thanks for your suggestion. Will be added on the next upgrade version.
     
    #4
  5. RippCo

    RippCo - Feb 4, 2015 New Member VIP Member

    Credit
    Point
    you'll also want to wrap that in a conditional, so that it doesn't ALWAYS default to true, only on registration

    Code:
    <xen:if is="{$contentTemplate} == 'register_form'">
                    <li><label for="ctrl_brmi_subscribe"><input type="checkbox" checked="check" name="brmi_subscribe" value="1" id="ctrl_brmi_subscribe" {xen:checked "{$brmiSubscribe}"} /> {xen:phrase subscribe}</label></li>
    <xen:else />
                    <li><label for="ctrl_brmi_subscribe"><input  type="checkbox" name="brmi_subscribe" value="1" id="ctrl_brmi_subscribe" {xen:checked "{$brmiSubscribe}"} /> {xen:phrase subscribe}</label></li>
    </xen:if>
    this seems to work for me
     
    Brivium likes this.
    #5