• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Changing Registration Page

CTXMedia

Formerly CyclingTribe
#2
For D.O.B. go to ACP > Options > User Registration - and untick Require Date of Birth and Minimum Age:

The others can been seen/edited in the template "register_form".

Cheers,
Shaun :D
 
#3
For D.O.B. go to ACP > Options > User Registration - and untick Require Date of Birth and Minimum Age:

The others can been seen/edited in the template "register_form".
Yeah although you'd still have to remove DOB from the template, unticking require doesn't remove it from the page.

But yeah, do the above and then just comment it out with <!-- -->

 

petertdavis

Well-known member
#4
Thanks. So, I've taken this bits out of that template but then it gives me an invalid timezone error when someone registers.

Code:
<dl class="ctrlUnit OptOut">
<dt>{xen:phrase date_of_birth}:</dt>
<dd>
<xen:include template="helper_birthday_input">
<xen:map from="$fields" to="$user" />
</xen:include>
<xen:if is="{$dobRequired}"><p class="explain">{xen:phrase your_date_of_birth_is_required}</p></xen:if>
</dd>
</dl>
 
<dl class="ctrlUnit">
<dt>{xen:phrase gender}:</dt>
<dd>
<ul>
<li><label for="ctrl_gender_male"><input type="radio" name="gender" value="male" id="ctrl_gender_male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
<li><label for="ctrl_gender_female"><input type="radio" name="gender" value="female" id="ctrl_gender_female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
<li><label for="ctrl_gender_"><input type="radio" name="gender" value="" id="ctrl_gender_" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
</ul>
</dd>
</dl>
 
<xen:include template="custom_fields_edit" />
 
<dl class="ctrlUnit">
<dt><label for="ctrl_timezone">{xen:phrase time_zone}:</label></dt>
<dd>
<select name="timezone" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_timezone">
<xen:foreach loop="$timeZones" key="$identifier" value="$name">
<option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
</xen:foreach>
</select>
</dd>
</dl>
 
#9
If the time zone is picked up anyway, but you need to keep it in the form for it to submit, why don't you wrap the section for the time zone in a hidden div?

in Register_form find this snippet:
Code:
<dl class="ctrlUnit">
        <dt><label for="ctrl_timezone">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="timezone" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_timezone">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl>
and replace it with this:

Code:
<div style="visibility:hidden;"><dl class="ctrlUnit">
        <dt><label for="ctrl_timezone">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="timezone" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_timezone">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl></div>
That seems to do the job for me.