• Resolved lbnn

    (@lbnn)


    Hello,

    First, thank you for your great plugin.

    Just want to customize a little bit more, my search form is on the member’s page, only on one xprofile field.

    Instead of a search field where people can type everything they want, since the filter is on a xprofile field with only a fixed number of values, I would prefer to have a drop-down list with only the value that this field can have.

    For example if my field is “team” and fixed values for this field are “1”, “2” and “3”, I want only those in the drop-down list.

    I tried something like this in a bp-custom.php file in “wp-content/plugins” directory, I found that code in another post :

    add_action ('bps_field_before_search_form', 'set_placeholder');
    function set_placeholder ($f)
    {
    	if ($f->code == 'field_9' && $f->display == 'selectbox')
    	{
    		$f->options[''] = '1';
                    $f->options[''] = '2';
                    $f->options[''] = '3';
    
    	}
    }

    But nothing changes, I certainly missed something..

    Thank you for your help ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter lbnn

    (@lbnn)

    So, I found how to manage it :).

    Now, is it possible to refresh results just after we select a choice in the drop-down field without clicking on “search” button ?

    If yes is it possible to hide search button ?

    Is it also possible to hide the actual selection and the button to flush it because since the field is shown in the drop-down selection, it’s not necessary to show it just above.

    Thank you

    Thread Starter lbnn

    (@lbnn)

    Ok, I found how to hide the actual selection and the button to flush it.

    Now if I could remove the search button and make the form refresh on each new selection would be great !

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi lbnn,

    I’m glad you found a way to implement the features you need!

    Unfortunately the last one, the ability to refresh the search results without hitting ‘Search’, is not available and I can’t see a feasible way to add it. Sorry!

    Thread Starter lbnn

    (@lbnn)

    @dontdream

    Thank you for your answer, I think there is some AJAX beside this related to onchange() event but not a lot of skills in this on my side…

    Can you just try to help me to change position of this button, I found no way to put it on the right side of the selectbox, he always go below..

    Thank you

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi lbnn,

    If you wish to change the appearance of your form, you can edit the form template, see:

    https://dontdream.it/bp-profile-search/form-templates/

    Unfortunately I am not an HTML and CSS expert and I am unable to suggest a specific solution for your request.

    Thread Starter lbnn

    (@lbnn)

    It’s okay I solved the problem ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Drop-down list’ is closed to new replies.