Range drop-down select code does not apply
-
Hi Andrea, I have followed your instructions to modify the range display, by adding this code to bp-custom.php, I also replaced the field number, but no action, the drop down doesn’t show.
Just to clarify, how do I find the correct corresponding field number; is it the field number in the search field form, counting fields from the top, or the field number in the profile fields?
Does it work with age range as well?
Regards
Carstenadd_action ('bps_field_before_search_form', 'change_display'); function change_display ($f) { if ($f->code == 'field_4' && $f->display == 'range') { $f->display = 'range-select'; $range = range (18, 99); $f->options = array ('' => '') + array_combine ($range, $range); } }
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
The topic ‘Range drop-down select code does not apply’ is closed to new replies.