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

XF 1.4 Double Gender Fields in Registration

clove28

Active member
#1
There are 2 gender fields in my registration form. I don't know why but how can I remove the other one? Please see the image..

2 gender.JPG
 

Mike

XenForo developer
Staff member
#2
The latter one of those looks like a custom field. You'd have to remove that or edit the register_form template to hide the default one.
 

clove28

Active member
#3
The latter one of those looks like a custom field. You'd have to remove that or edit the register_form template to hide the default one.
Which part in the register_form should I edit? I'm not a coder so I find this a difficult one..:D
 

Brogan

XenForo moderator
Staff member
#4
The bit related to the gender.

HTML:
    <dl class="ctrlUnit">
        <dt>{xen:phrase gender}:</dt>
        <dd>
            <ul>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                <li><label><input type="radio" name="{$fieldMap.gender}" value="" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
            </ul>
        </dd>
    </dl>
Remove that.
 

Chris D

XenForo developer
Staff member
#7
I actually suggest not using an add-on for this.

The default gender field only appears in three locations in the front end of XF.

It appears in the back end, too, but removing those is superfluous if it cannot be manipulated in the front end.
 

clove28

Active member
#8
I actually suggest not using an add-on for this.

The default gender field only appears in three locations in the front end of XF.

It appears in the back end, too, but removing those is superfluous if it cannot be manipulated in the front end.
But if I use the one Brogan suggested, will it also affect the other locations?
 

Brogan

XenForo moderator
Staff member
#9
Removing it from that template will only stop it showing in the register form.

If you want to remove it from other templates/pages, you will need to edit those also.