XF 2.0 How to add Terms and Conditions to the registration page?

You could add your T&C into the template: register_form or else the phrase by_registering_you_agree_to_our_terms_and_privacy_policy on the registration form.
 
Last edited:
Thanks, but HOW to add your T&C into the template: register_form ?
It all depends on where you want it it. I do these types of things by trial and error (using my test forum).

I assume you know basic html as that is required, and you might then add that html into various postions, check the results, and when you are happy then do it on your live forum.

On second thoughts, you could try the template register_macros

But if you arem't confident editing tmeplates, I would do as I said above and edit the phrase by_registering_you_agree_to_our_terms_and_privacy_policy - that is how I have added changes to my registration page. You could add your html either abopve or beow the phrase. Again trila and error - do it on a test site first if in doubt.
 
If this is the template Register_form, where do I need to add the code for T&C and what code it is, so I could just paste the T&C

<xf:js src="xf/login_signup.js" min="1" />

<xf:title>{{ phrase('register') }}</xf:title>

<xf:head option="robots"><meta name="robots" content="noindex" /></xf:head>

<xf:if is="$providers is not empty">
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:formrow rowtype="button"
label="{{ phrase('register_faster_using') }}">

<ul class="listHeap">
<xf:foreach loop="$providers" value="$provider">
<li>
<xf:macro template="connected_account_macros" name="button"
arg-provider="{$provider}" />
</li>
</xf:foreach>
</ul>
</xf:formrow>
</div>
</div>
</div>
</xf:if>

<xf:form action="{{ link('register/register') }}" ajax="true" class="block"
data-xf-init="reg-form" data-timer="{$xf.options.registrationTimer}">

<div class="block-container">
<div class="block-body">
<xf:comment>Spam catcher field</xf:comment>
<xf:textboxrow name="username" value="" autocomplete="off" rowclass="formRow--limited"
maxlength="{{ max_length($xf.visitor, 'username') }}"
label="{{ phrase('user_name') }}"
explain="{{ phrase('please_leave_this_field_blank') }}" />

<xf:macro template="register_macros" name="username_row"
arg-fieldName="{{ $regForm.getFieldName('username') }}"
arg-value="{$fields.username}" />

<xf:comment>Spam catcher field</xf:comment>
<xf:if is="{{ rand(0, 2) == 1 }}">
<xf:textboxrow name="{{ $regForm.getFieldName('email_hp') }}" value="" type="email" autocomplete="off"
rowclass="formRow--limited"
maxlength="{{ max_length($xf.visitor, 'email') }}"
label="{{ phrase('email') }}"
explain="{{ phrase('please_leave_this_field_blank') }}" />
</xf:if>

<xf:macro template="register_macros" name="email_row"
arg-fieldName="{{ $regForm.getFieldName('email') }}"
arg-value="{$fields.email}" />

<xf:comment>Spam catcher field</xf:comment>
<xf:if is="{{ rand(0, 2) == 1 }}">
<xf:textboxrow name="email" value="" type="email" autocomplete="off" rowclass="formRow--limited"
maxlength="{{ max_length($xf.visitor, 'email') }}"
label="{{ phrase('email') }}"
explain="{{ phrase('please_leave_this_field_blank') }}" />
</xf:if>

<xf:comment>Spam catcher field</xf:comment>
<xf:if is="{{ rand(0, 2) == 1 }}">
<xf:textboxrow name="password" type="password" autocomplete="off" rowclass="formRow--limited"
label="{{ phrase('password') }}"
explain="{{ phrase('please_leave_this_field_blank') }}" />
</xf:if>

<xf:passwordboxrow name="{{ $regForm.getFieldName('password') }}" autocomplete="new-password"
label="{{ phrase('password') }}"
hint="{{ phrase('required') }}"
required="required" checkstrength="true" />

<xf:macro template="register_macros" name="dob_row" />

<xf:macro template="register_macros" name="location_row"
arg-value="{$fields.location}" />

<xf:macro template="register_macros" name="custom_fields" />

<xf:captcharow label="{{ phrase('verification') }}" hint="{{ phrase('required') }}" />

<xf:macro template="register_macros" name="email_choice_row" />

<xf:macro template="register_macros" name="tos_row" />
</div>
<xf:macro template="register_macros" name="submit_row" />
</div>

<xf:hiddenval name="reg_key">{{ $regForm.getUniqueKey() }}</xf:hiddenval>
<xf:hiddenval name="{{ $regForm.getFieldName('timezone') }}" value="" data-xf-init="auto-timezone" />
</xf:form>
 
Back
Top Bottom