Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
How to: Input gender as a text field
I've ran a forum or two in the past and someone who doesn't identify as male or female might not want to just have a simple "other" sitting on their profile. Some didn't even want to sign up because of it. So I went in to do a bit of editing and was able to make it so people could type in the gender themselves, rather than choosing an option.
(TL;DR: This changes the gender option from a radio button to a TextField. I use public_html, so if you don't then just follow from wherever you have Mysidia installed) Step 1 (The only step) Go to public_html/view/accountview. See this whole block?: Replace it with: (Optional) Step 2 Now go to phpMyAdmin and find prefix_users_profile. Change the varchar on gender from 10 to 20, just in case there isn't enough space. Save and that's it. Pretty basic. I plan to do more tutorials in the future once I figure more stuff out. |
#2
|
||||
|
||||
This is a good idea, but you might also want to change the 'register' file too! That way they can do it straight away, instead of having to go and edit their profile after sign up ^_^ (Or at least that's what I am doing XD)
Thanks for the tip off, though. I think it's a great idea :3 Definitely shows you're/your site is more inclusive! |
#3
|
||||
|
||||
Interesting tutorial, but I wonder what is the use case of having gender as text field rather than radio button list. To my understanding genders are fixed constants, not like your name and age which can vary greatly. If you dont like 'other', you can change it to 'unknown' or 'unspecified' anyway.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#4
|
||||
|
||||
Parayna - I actually forgot about editing the register file! I opened it up too when I was editing; I guess it slipped my mind somehow.
HoF - I was originally going to keep the radio list and just add options for a few common gender identities (besides male and female, like nonbinary, bigender, the list goes on and on) people might have; but then there's the chance that someone's identity isn't on the list, in which I would still need to keep "other"/"unknown" anyway and it kind of defeated the purpose of editing the script in the first place. So basically I came up with this to completely avoid any issues it might cause further down the line, if there happen to be any at all. |
#5
|
||||
|
||||
This is such a small fix that will mean a lot to some people, thank you for posting this!
__________________
Last edited by Eagle9615; 09-28-2016 at 09:30 AM. |
#6
|
||||
|
||||
This is great! Will make many users so much more comfortable! I know of people who will not even sign up on a website because of the discomfort it causes if they have to choose from a set list of genders, so this will really help that!
__________________
My Mods Site (1.3.4, 2020 Mods) |
#7
|
||||
|
||||
Thanks for all the input! I went in to see if I could change the register file too. It's a bit untested, since I haven't set up a new account on my site to see if it works, but I shouldn't cause any errors. Let me know if it does!
Under registerview.php, find these lines (should be 45-53): PHP Code:
PHP Code:
|
#8
|
||||
|
||||
worked beautifully! As a trans person with many diversely gendered friends I really appreciate this one
|
Thread Tools | |
Display Modes | |
|
|
What's New? |
What's Hot? |
What's Popular? |