Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Increase Indentation on list

Viewing 10 posts - 11 through 20 (of 22 total)
  • Ben Chinn
    #83502
    This reply has been marked as private.
    Trevor Moderator
    #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.

    Ben Chinn
    #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 Moderator
    #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;

    Ben Chinn
    #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 Moderator
    #85781

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

    Ben Chinn
    #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 Moderator
    #85790

    might need to be display: none !important;

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

    Ben Chinn
    #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 Moderator
    #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)

The topic ‘Increase Indentation on list’ is closed to new replies.