[buddypress-trac] [BuddyPress Trac] #6751: Extended profile checkbox defaults are overly enthusiastic.

buddypress-trac noreply at wordpress.org
Tue Nov 24 19:01:26 UTC 2015


#6751: Extended profile checkbox defaults are overly enthusiastic.
----------------------------------+-----------------------------
 Reporter:  dcavins               |      Owner:
     Type:  enhancement           |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  Component - XProfile  |    Version:  2.4.0
 Severity:  normal                |   Keywords:  has-patch
----------------------------------+-----------------------------
 If there's a default value set for a checkbox, it is pre-selected when
 users first encounter the form. (That seems good.) But if a user selects
 none of the options so that an empty array is saved to the db, then every
 time the user edits that profile field group, the default option is pre-
 selected again. Like the form is saying "Are you SURE you don't want to
 pick this option?"

 I've attached a patch that attempts to differentiate one null value from
 another by checking the return value type from
 `BP_XProfile_ProfileData::get_value_byid()`, which appears to return an
 empty array if there is a saved value that is empty (no options selected)
 vs an empty string if no value exists for that field/user combination.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6751>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list