WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Make Intitial View With No Rows / Only Search One Column (3 posts)

  1. Burke Ingraffia
    Member
    Posted 4 years ago #

    I love the WP-Table Reloaded plugin. It's great. I am just trying to do a few things with it. Thank in advance for your help:

    1. Make the initial view empty so no rows other than the headers appear.

    2. Make only 1 column searchable

    3. Eventually add a dropdown select box to replace the text entry search box. This is so only specific values can be searched (e.g., a list of US States).

    I have a wp-table-reloaded-extensions.php plugin ready to go as soon as I can figure out what to do.

  2. TobiasBg
    Member
    Plugin Author

    Posted 4 years ago #

    Hi,

    ok, you really have some complicated requirements.

    Unfortunately, I can only imagine a solution to number 2). For the other two things a have not seen a solution so far, sorry. It might be possible with some custom programming though, using the DataTables API from http://www.datatables.net

    Anyway, back to number 2.):
    What you will need to do is add a line of code to the "Custom Commands" textfield in the "DataTables JavaScript Features" section on the "Edit" screen of your table.
    That code looks like this, but needs to be modified:

    "aoColumns": [ { "bSearchable": true }, { "bSearchable": false }, { "bSearchable": false }, { "bSearchable": false } ]

    Basically you will need to construct a list, which has as many entries as you have columns. For each column, a { "bSearchable": X } with X either being true or false, depending on what you want for the column. true would mean the column is searchable, while false means that it is not. So, my example code above would work for a 4-column table, where only the first column would be searchable.

    Best wishes,
    Tobias

  3. Burke Ingraffia
    Member
    Posted 4 years ago #

    This is very helpful - thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic