Add Option for Open Text Field to BP Profile Checkbox Fields
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.
#5 Updated by Boone Gorges about 10 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.
#7 Updated by Matt Gold almost 10 years ago
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.
#10 Updated by Boone Gorges almost 10 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