Hello Kieran,
What about setting the size to, say, one third of the options, with minimum 3 and maximum 30? And then adding a filter hook to allow users to change the result?
Please let me know what you think, I’m open to suggestions.
Thread Starter
Kieran
(@kierantaylorio)
Hi,
That sounds absolutely perfect – especially the additional filter for niche and specific setups.
All the best,
Kieran
Thread Starter
Kieran
(@kierantaylorio)
On a related/unrelated note is there a filter to set the minimum and maximum ages for an age range field? We see a lot of adult based communities that would benefit from having a minimum age option on the form.
Sorry for all the messages
Kieran
Hello Kieran,
I’ll add the multi-select size to the next BP Profile Search version.
About the age range, by default it’s displayed using two input boxes, but you can change that to two drop-down select boxes, with the range of values you need. A sample code is:
add_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);
}
}
The above is taken from:
https://dontdream.it/bp-profile-search/form-templates/
Hello Kieran,
BP Profile Search 5.0.4 adds the ability to change the multiple select size. I didn’t change the default after all, but the new feature allows to customize the size as needed.