Forums Forums Search & Filter Pro Increase Indentation on list

Viewing 10 posts - 11 through 20 (of 22 total)
  • Anonymous
    #83502
    This reply has been marked as private.
    Trevor
    #83511

    The first line would be like this:

    function filter_function_name($input_object, 87)
    

    as to the rest, I would need to spend a bit of time to look at the code example, which would mean tomorrow.

    Anonymous
    #85743

    Hi Trevor,
    Was wondering if you had a chance to look at the rest of the code, to add in a stronger indentation of the drop down menus.

    Thanks!

    Trevor
    #85760

    Well, I would have guessed to change this:

    $input_object = "test". $input_object;

    for this?

    $input_object = " ". $input_object;

    or maybe:

    $input_object = "  ". $input_object;

    Anonymous
    #85779

    thank you Trevor, I’ll give it a try.

    As a side question, is there a simple way to have the search only show the parent categories and not any of the child categories?

    Trevor
    #85781

    Only by using Custom CSS to hide the children (they have a class which is different to the parent).

    Anonymous
    #85783

    I tried using CSS, unfortunately Macs/ Safari refuse to honor display:none;

    Regarding the code
    // add indent to dropdown

    function filter_function_name($input_object, $sfid87) //I cant change it to just 87 as its expecting a variable
    {
    if($input_object[‘name’]==’_my_field_name’) // this should be the class name?
    {
    //udpate this field before rendering
    $input_object = ”  “. $input_object;
    }

    return $input_object;
    }
    add_filter(‘sf_input_object_pre’, ‘filter_function_name’, 10, 2); // what is 10,2 is that something that I should be changing?

    Sorry to be such a bother.

    Trevor
    #85790

    might need to be display: none !important;

    The numbers are priority and (I think) number of hooks/variables passed.

    Anonymous
    #85810

    thanks tried to do important but didnt work.

    Sorry regarding the code,
    A: $sfid how do I write the number of the search form, if i just replace it with 87, it gives aphp error that it is expecting a variable not a number

    B: if($input_object[‘name’]==’_my_field_name’) – _my_field_name should be the class?

    Trevor
    #85822

    I do not know, it is not a filter I have used. Did you look at the examples on the github page?

Viewing 10 posts - 11 through 20 (of 22 total)