• Resolved Kieran

    (@kierantaylorio)


    Hi,

    I was wondering if there was a way to set the size value for select fields where multiple selection is true. Either by counting the amount of options within the field or manually setting it based on the field ID. Currently there is no value for size and it defaults to showing 4 which could be an issue for long lists.

    Thank you for your time,

    Kieran

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    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

    Plugin Author Andrea Tarantini

    (@dontdream)

    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/

    Plugin Author Andrea Tarantini

    (@dontdream)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Setting the size value for multi select’ is closed to new replies.