Changeset 5552
- Timestamp:
- 12/14/2011 08:09:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-template.php
r5418 r5552 412 412 413 413 $defaults = array( 414 'type' => false 414 'type' => false, 415 'null_on_required' => false // Generally, a required dropdown field will not 416 // get a blank value at the top. Set to true if 417 // you want this blank value even on 418 // required fields 415 419 ); 416 420 … … 429 433 switch ( $field->type ) { 430 434 case 'selectbox': 431 if ( !$field->is_required )435 if ( !$field->is_required || $null_on_required ) 432 436 $html .= '<option value="">' . /* translators: no option picked in select box */ __( '----', 'buddypress' ) . '</option>'; 433 437
Note: See TracChangeset
for help on using the changeset viewer.