Project

General

Profile

Feature #1199

Add Option for Open Text Field to BP Profile Checkbox Fields

Added by Matt Gold about 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2011-09-25
Due date:
% Done:

0%

Estimated time:

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

Related to CUNY Academic Commons - Feature #643: Create Mechanism to Require People to Fill Out New Identity Profile FieldResolved2011-03-17

Related to CUNY Academic Commons - Feature #642: Create new BuddyPress Profile Field to Designate RoleResolved2011-03-17

Related to CUNY Academic Commons - Feature #629: Create Required Profile Field to Define User StatusResolved2011-03-01

History

#1 Updated by Boone Gorges about 10 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.

#2 Updated by Boone Gorges almost 10 years ago

  • Target version changed from 1.3 to 1.4

#3 Updated by Matt Gold almost 10 years ago

Thanks, Boone.

#4 Updated by Boone Gorges over 9 years ago

Ray, I'm leaving this assigned to me, though you're welcome to it if it sounds fun to you.

#5 Updated by Boone Gorges over 9 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.

#6 Updated by Boone Gorges over 9 years ago

  • Status changed from Assigned to Reporter Feedback

Looking for feedback on this one when you get a chance (it's on cdev).

#7 Updated by Matt Gold over 9 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.

#8 Updated by Boone Gorges over 9 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?

#9 Updated by Matt Gold over 9 years ago

What's your desired behavior?

My expectation was that my profile would have shown up in that search.

#10 Updated by Boone Gorges about 9 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

#11 Updated by Matt Gold about 9 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.

#12 Updated by Boone Gorges about 9 years ago

I know where we can get some primo eye of newt. Can you start the sole source justification?

#13 Updated by Matt Gold about 9 years ago

On it.

Also available in: Atom PDF