Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#3698 closed enhancement (fixed)

Required Profile Fields in BP 1.5+ no longer give an option for a null value in the drop down, but become pre filled with the first option.

Reported by: rossagrant's profile rossagrant Owned by: ross-grant's profile Ross Grant
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5
Component: Core Keywords: needs-patch
Cc:

Description

Required profile field behaviour has changed in BP 1.5

When a user is selecting an option from the drop down menu on a registration page the required fields are pre filled with the first option in the dropdown.

This means that incorrect data can be saved if a person overlooks a field and it also hinders other plugins that use this core functionality, such as BP Profile Search.

There used to be an option above each list of potential answers that showed as ---------

Thus there was a null option.

I have created this screencast to explain this a little easier:

http://screenr.com/Fjrs

Boone suggested this solution but I am not a coder:

I would be happy to see a patch for BP that allows bp_get_the_profile_field_options() to take an argument along the lines of show_null_value_for_required (maybe not that wordy, but you get the idea). That way, we could default to false (1.5 behavior) but allow the 1.2.x behavior optionally, at http://buddypress.trac.wordpress.org/browser/trunk/bp-xprofile/bp-xprofile-template.php?annotate=blame&rev=5230#L431.

Change History (4)

#1 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Severity changed from normal to minor

#2 @boonebgorges
13 years ago

I will try to get around to this, but it's puntable if no one manages to squeeze it in.

#3 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5552]) Adds 'null_on_required' param to bp_get_the_profile_field_options(), which will allow theme authors to display a blank option in a Required dropdown if they wish. Fixes #3698

#4 @djpaul
11 years ago

In 7599:

XProfile: Show the placeholder text for all select box profile fields.

Prior to BP 1.5, the "----" placeholder item for select boxes was shown for both optional and mandatory fields. In BP 1.5 in r4831, the behaviour was changed to only show the placeholder item for optional profile fields. With retrospect, that change didn’t make much sense.

This commits restores the original behaviour, showing the placeholder text for all select box profile fields. A user should be forced to pick an option for a required profile field, and not allow the web browser to automatically select the first option in the <select> element.

See #3378, #3698, and #5184. Props haykayltduk, hnla, DJPaul at WordCamp London contributor day!

Note: See TracTickets for help on using tickets.