Changing "apply for membership" options
Is there a way to customize the form people fill out? First, the gender item needs to go. Second, the "why" text box question probably also needs to go.
However, I would like to ask an item asking what type of employee they are (part-time, full-time) and perhaps what department the work in. Is there any way to easily do this? If so, I'm not finding it.
Best Answer
-
suzanne New
Its quite weird indeed they still haven't addressed it, for it's easy to fix this.
Feel free to use this at your own risk, make backups and stuff like that.
database
First of all there's the database to adjust. Login to your database server, use the correct database and execute the following command:ALTER TABLE GDN_User CHANGE Gender Gender ENUM('x','m', 'f');
exit the database. Now the complicated part starts:
search and replace
cd to your forum root dir and execute:models dir:
sed -i 's/\x27Gender\x27 => array(\x27m\x27, \x27f\x27)/\x27Gender\x27 => array(\x27x\x27, \x27m\x27, \x27f\x27)/g' applications/dashboard/models/*.php
settings dir:
sed -i 's/\x27Gender\x27, array(\x27m\x27, \x27f\x27), \x27m\x27)/\x27Gender\x27, array(\x27x\x27, \x27m\x27, \x27f\x27), \x27x\x27/g' applications/dashboard/settings/*.php
and we by default don't care, so x marks the spo... err, gender:
sed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' applications/dashboard/views/entry/*.php
and let people choose their respective gender properly, so add to array:
sed -i 's/GenderOptions = array(/GenderOptions = array(\n\x27x\x27 => T(\x27unspecified\x27),/g' applications/dashboard/controllers/*.php*
andsed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' applications/dashboard/settings/*.php* applications/dashboard/views/profile/*.php
For VanillaBootstrap theme users:
sed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' themes/VanillaBootstrap/views/entry/*
There you go .
5
Answers
There was an error rendering this rich post.
I would like to remove the "Gender" information simply because it shouldn't matter. Besides the fact that my forum is not a dating site, many members feel that their opinions will become biased on whether they are male or female.... or other for that matter. For instance, how much could a Female know about auto mechanics? And what would a Straight Male know about decorating?
How can we remove it?
BubCity, have you had any luck removing the gender information?
I've removed the gender-related information from the register.php files (www\applications\dashboard\views\entry\register*.php:) and haven't had any issues since, but i'm very inexperienced at this and am not sure if there is a better way.
For situations such as this you may want to edit:
$this->GenderOptions = array( 'm' => T('Male'), 'f' => T('Female'), 't' => T('Transvestite') }
In:
applications/dashboard/controllers/class.profilecontroller.php
applications/dashboard/controllers/class.entrycontroller.php
Just thought I'd add this while I was looking at it.
Thank you! but if I select your 3rd option then I get a "Gender is not valid." error...
I've missing to do something is not ?
PS: I'm using Vanilla 2.0.18.4
Wow, I can't believe after all this time this hasn't been fixed. The issue isn't male/female/transgender. The issue is why are we asking the question in the first place? Can't we just remove this somehow?
Its quite weird indeed they still haven't addressed it, for it's easy to fix this.
Feel free to use this at your own risk, make backups and stuff like that.
database
First of all there's the database to adjust. Login to your database server, use the correct database and execute the following command:
ALTER TABLE GDN_User CHANGE Gender Gender ENUM('x','m', 'f');
exit the database. Now the complicated part starts:
search and replace
cd to your forum root dir and execute:
models dir:
sed -i 's/\x27Gender\x27 => array(\x27m\x27, \x27f\x27)/\x27Gender\x27 => array(\x27x\x27, \x27m\x27, \x27f\x27)/g' applications/dashboard/models/*.php
settings dir:
sed -i 's/\x27Gender\x27, array(\x27m\x27, \x27f\x27), \x27m\x27)/\x27Gender\x27, array(\x27x\x27, \x27m\x27, \x27f\x27), \x27x\x27/g' applications/dashboard/settings/*.php
and we by default don't care, so x marks the spo... err, gender:
sed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' applications/dashboard/views/entry/*.php
and let people choose their respective gender properly, so add to array:
sed -i 's/GenderOptions = array(/GenderOptions = array(\n\x27x\x27 => T(\x27unspecified\x27),/g' applications/dashboard/controllers/*.php*
and
sed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' applications/dashboard/settings/*.php* applications/dashboard/views/profile/*.php
For VanillaBootstrap theme users:
sed -i 's/GenderOptions, array(\x27default\x27 => \x27m\x27/GenderOptions, array(\x27default\x27 => \x27x\x27/g' themes/VanillaBootstrap/views/entry/*
There you go .
Maybe there is a way to simply hide the "Gender" radio buttons on the "Apply for Membership" screen?
Found it! Fixed it!
<li class="Gender">
section.