Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-16-2016, 09:42 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,255
Dinocanid is on a distinguished road
Default 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?:

  Spoiler: code 

$profileForm->add(new Comment("Gender: "));

$genderList = new RadioList("gender");
$genderList->add(new RadioButton("Male", "gender", "male"));
$genderList->add(new RadioButton("Female", "gender", "female"));
$genderList->add(new RadioButton("Unknown", "gender", "unknown"));
$genderList->check($profile->getGender());

$profileForm->add($genderList);


Replace it with:

  Spoiler: newcode 
$profileForm->add(new Comment("Gender: ", FALSE));
$profileForm->add(new TextField("gender", $profile->getGender()));


(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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:23 AM.

Currently Active Users: 9740 (0 members and 9740 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636