Monthly Archives: April 2012

Add an “Other” checkbox (with textbox) to a BuddyPress profile field

This is a pretty common form format:


(Imagine that the textbox was next to the word ‘Other’ – wpautop() or something is being a stupid craphead and inserting a line break.)

It’s not really possible with BuddyPress’s xprofile fields. Today I dove into the codebase to see how hard it would be to add such a feature natively. The answer: Too.

So I wrote a hackish plugin instead, which you can get from this gist. (Note that it’s not in a plugin wrapper. Put it in your bp-custom.php.) To use: (1) On the Admin screen for a profile field, select ‘Yes’ under “Other Field”. (Note: it only works for checkbox fields!!) (2) ??? (3) Profit.