Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How can i remove "Unspecified" gender from registration form

jone68jone68 New
edited January 2013 in Vanilla 2.0 - 2.8

I'd like to remove Unspecified gender option from registration form. Only keep Male and Female options

How can i do that?



  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    GenderOptions array is where these are, I have not seen unspecified in mine but would like to add it :) ..., but May I ask why?
    What about transgender people ? or those who are in between or those who are hermaphrodites ? Or those who wish their gender to be anonymous ?
    This is what I would do to add it. I suppose if you can find it(coz I don't have that) just remove the option.

    $this->GenderOptions = array(
    'm' => T('Male'),
    'f' => T('Female'),

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2013

    @achu If you give a url to the form I could figure out how to hide it using css. I am guessing this is what it is called since female is gender 1 and male is just gender, but would need to see to be sure.

    li.Gender label input#Form_Gender2{display:none;}

    Edit: I tested this and it works when I added 'u'=>T('Unspecified') to my class.entrycontroller.php and in the source code it gives me Gender2 as the unspecified.

    It is not advisable to edit the controllers, so I suggest you use css as I posted to remove it.

    (It would be great to just have one classification, 'h'=> T('Human') )

  • Options
    LincLinc Detroit Admin

    Yes, hiding with CSS is the best approach.

    @vrijvlinder said:
    (It would be great to just have one classification, 'h'=> T('Human') )

    Agreed. If only our language was so enlightened.

  • Options

    @vrijvlinder Thank you so much for your great help. Yes, hiding with css works fine. Thanks,

Sign In or Register to comment.