• Resolved xarcadia

    (@xarcadia)


    First let me thank you very much for such a wonderful plugin, it is incredibly useful. 2nd I wanted to ask you the following:

    1) I am using the ColumnFilterWidget and would like to stack all of them one on top of the other so that each drop down is on its own line. I know that you mentioned a few months ago that that might not be possible, but I wanted to see if it was at this time.

    2) Is there a way to add a reset button so that it will reset all of the filters?

    3) We have several columns say titled “Column 1”, “Column 2”, “Column 3” and we would like to hide Columns 1 and 2, but still have the drop down filter appear at the top so that we can just have “Column 3” pare down to a few final options once the drop down options are selected. However, if I hide columns 1 and 2, then their drop down filters disappear as well. Is there a way to have the dropdowns visible while the columns remain invisible?

    4) Lastly, is there a way to hide one of the dropdowns? (Column 3, since that is the end product and we dont want people to search using that option).

    Thank you very much in advance for your help.

    https://wordpress.org/plugins/tablepress/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    1) Sorry, I’m not aware of a solution here. I can only suggest to play around with the CSS for this, e.g. in the Developer Tools of your browser.

    2) I’ve also not seen something for that before. You’ll likely need additional JavaScript code. As I’m not the developer of the ColumnFilterWidgets JS code (I only make it available as a TablePress Extension), I don’t know how that would have to look like however.

    3) This depends on how you hide the columns. If you hide them via “Custom CSS”, e.g.

    .tablepress-id-123 .column-1,
    .tablepress-id-123 .column-2 {
      display: none;
    }

    you should get the dropdowns.

    4) For this, you can use the datatables_columnfilterwidgets_exclude_columns Shortcode parameter that is mentioned on http://tablepress.org/extensions/datatables-columnfilterwidgets/

    Regards,
    Tobias

    Thread Starter xarcadia

    (@xarcadia)

    Thank you so much for your assistance. I followed the instructions, and though your solutions do hide all of the columns as expected, and show all of the appropriate drop down menus, it is no longer allowing me to use the drop downs to filter anything out. I select the options, but the table list remains the same.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    that sounds strange. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter xarcadia

    (@xarcadia)

    Thanks for your help. You can see it here: Table Page

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link!
    I assume that this is caused by some invalid JavaScript code on the page. In the footer, I see this:

    add_filter( 'login_url', 'my_login_url' );
    2
    function my_login_url( $url ) {
    3
        $redirect_to = '?redirect_to=' . get_permalink();
    4
        return 'http://curadelresvetimaging.com/home/user-profile/' . $redirect_to;
    5
    }

    This is however PHP code and not JavaScript code. Please remove that from the page footer.

    Regards,
    Tobias

    Thread Starter xarcadia

    (@xarcadia)

    Thanks for responding. I removed that code, but the error still remains.

    Thread Starter xarcadia

    (@xarcadia)

    On one additional note, if i have all of the columns shown, then it does in fact filter correctly using the drop down menus.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ok, then let’s try a different way of hiding the column. Please remove the “Custom CSS” for the hiding of the columns again, and instead add this to the “Custom Commands” textfield on the “Edit” screen:

    "columnDefs": [ { "visible": false, "targets": [ 0, 1, 2, 3 ] } ]

    Regards,
    Tobias

    Thread Starter xarcadia

    (@xarcadia)

    Thank you for responding again. I made that change, still no dice. Could it be that the columns have to be showing for the filtering to work?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, found it 🙂 The “Search/Filter” checkbox must be enabled for the table, otherwise this will not work. So, please enable that. You can then hide the search field with some “Custom CSS”:

    #tablepress-4_filter {
      display: none;
    }

    Regards,
    Tobias

    Thread Starter xarcadia

    (@xarcadia)

    Thanks so very much! I appreciate your help!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Column Filter Widget’ is closed to new replies.