Forums Forums Search & Filter Pro Unable to Change tag for dropdowns

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #260914

    CSS for <option> tags is ignored by Google Chrome. I am trying to change the <option> tag to <li> or <div> with the relevant class names, but when I do, the dropdown breaks completely, only listing the entire set of items in the dropdown in the inspector. (See image)

    I am editing line 270 of class-search-filter-generate-input.php in search-filter-pro/public/includes like so

    <div<?php echo $option_attibutes_html; ?> value="<?php echo esc_attr($option->value); ?>"><?php echo $option_label; ?></div>

    The attached image shows the resulting output. I do not see the DIV tag even in the console.

    Anonymous
    #260915

    Anonymous
    #260916

    This same issue occurs if I change the line to a list, or <p> or anything other than <option>

    Trevor
    #261027

    Our plugin needs for the form to use certain HTML structure, so what you are trying is unlikely to work.

    Instead, use Select2 to make the select boxes. You may need to make some changes.

    Go to wp-admin -> Search & Filter -> Settings -> Combobox Script

    Change this from Chosen to Select2 – we’re dropping support for Chosen in v3, because it has too many issues on mobile.

    Next, in the form field settings, select the combobox option for each.

    There is an alternate way of doing this, but this is the easiest. Now you can style the resulting select as it is not a select!

Viewing 4 posts - 1 through 4 (of 4 total)