Feature #1199
closedAdd Option for Open Text Field to BP Profile Checkbox Fields
0%
Description
On our profile fields, we now ask members to indicate whether they are faculty, administrators, staff, grad students, or "Other." We had hoped to have an open text field in place of that "Other," but that doesn't seem possible right now -- one either has to choose textboxes or checklists or buttons, etc., when setting up profiles.
Related issues
Updated by Boone Gorges about 13 years ago
This is a pretty big job, as it will involve doing some gutting of the way profile fields work. Proposing we boot until 1.4.
Updated by Boone Gorges almost 13 years ago
- Target version changed from 1.3 to 1.4
Opened a BP ticket: http://buddypress.trac.wordpress.org/ticket/3775
Updated by Boone Gorges over 12 years ago
Ray, I'm leaving this assigned to me, though you're welcome to it if it sounds fun to you.
Updated by Boone Gorges over 12 years ago
Here's the status of this ticket.
I spent some time this afternoon exploring the possibility of a BP patch. I ran into a couple problems. First, I was pretty unsure about how to make the admin UI make sense. Second, and more importantly, BP's xprofile code is really convoluted, and making this kind of change would require extensive rewrites to the core code, to ensure proper scalability.
So I went a different route and wrote it as a plugin, which is pretty rough around the edges, but works. When you are editing a profile field in the Network Admin, you'll see an option to enable an "Other Field". When set to 'Yes', users editing their profile will have an option at the end of their list:
[ ] Other [textbox]
Note that, at the moment, this only works for checkboxes. I can add radio button support in the future if you need it.
The changes are on cdev, where I have also gone ahead and modified the Role field appropriately. Please have a look and let me know whether you think this is workable for now. Thanks.
Updated by Boone Gorges over 12 years ago
- Status changed from Assigned to Reporter Feedback
Looking for feedback on this one when you get a chance (it's on cdev).
Updated by Matt Gold over 12 years ago
Fantastic!
Just one thing: on my cdev profile, I had faculty and administrator. I used this new feature to add "pizza lover." When it appeared on my profile, I clicked on the link, which leads to a search of the commons for members with that phrase in their profile field. But no results came up. Will that be the case for all customized labels?
Not a big deal, but maybe something to look into. Otherwise, this looks great and is ready to go.
Updated by Boone Gorges over 12 years ago
Will that be the case for all customized labels?
They will all link to a search. The search will only turn up empty if, in fact, no one else has listed that phrase anywhere in their profiles. What's your desired behavior?
Updated by Matt Gold over 12 years ago
What's your desired behavior?
My expectation was that my profile would have shown up in that search.
Updated by Boone Gorges over 12 years ago
- Status changed from Reporter Feedback to Resolved
I had to do some mild sorcery to make this work (it's a hack on top of the 'Other' hack), but here it is: http://cdev.gc.cuny.edu/members/?s=Pizza+Lover
https://github.com/castiron/cac/commit/40403757533ff45aef90481c0531467d7189c8fd
Updated by Matt Gold over 12 years ago
Fantastic -- thanks, Boone. Please let me know whether we should include a cauldron, mandrake root, snake venom, and frogs in our next OTPS request.
Updated by Boone Gorges over 12 years ago
I know where we can get some primo eye of newt. Can you start the sole source justification?