1. 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

Discussion in 'XenForo Questions and Support' started by clove28, Sep 19, 2014.

  1. clove28

    clove28 Active Member

    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
     
  2. Mike

    Mike XenForo Developer Staff Member

    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.
     
  3. clove28

    clove28 Active Member

    Which part in the register_form should I edit? I'm not a coder so I find this a difficult one..:D
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
  5. clove28

    clove28 Active Member

    Thanks Mike & Brogan! :)
     
  6. AndyB

    AndyB Well-Known Member

  7. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Tracy Perry likes this.
  8. clove28

    clove28 Active Member

    But if I use the one Brogan suggested, will it also affect the other locations?
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
    clove28 likes this.
  10. clove28

    clove28 Active Member

    I just wanted it to remove from registration form. Thanks Brogan!
     
  11. ph.d

    ph.d Member

    I have the same problem after upgrade 1.4.1? Pacifico-FONT.VIETDESIGNER.NET-2.jpg
     
  12. Amaury

    Amaury Well-Known Member

    It's likely related to an add-on or a style. Disable all add-ons and use the default XenForo style and see if the issue persists.
     
    ph.d likes this.
  13. ph.d

    ph.d Member

    My problem is done :)

    I try to remove in register_form and put css display:none in EXTRA.css!
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page