Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
How can i remove "Unspecified" gender from registration form

I'd like to remove Unspecified
gender option from registration form. Only keep Male
and Female
options
How can i do that?
Thanks,
0
Comments
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'),
'u'=>T('Unspecified')
);
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@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') )
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Yes, hiding with CSS is the best approach.
Agreed. If only our language was so enlightened.
@vrijvlinder Thank you so much for your great help. Yes, hiding with css works fine. Thanks,