Support » Plugin: TablePress » Predefined Buttons

  • Resolved Yaara

    (@yaaraher)


    Hi
    I would like to add predefined buttons to help filter the results. The DataTables ColumnFilterWidgets extension won’t help in this case, as the field is a bit messy. The field have several checkbox options and one can check all of them or just few.
    So what I would like to do is to somehow define a text filter and show it as a button. Is there a way to do this?

    • This topic was modified 4 months, 1 week ago by  Yaara.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You could maybe take a look at the TablePress Extension from https://tablepress.org/extensions/datatables-button-filter/

    Regards,
    Tobias

    Amazing!
    (You can have a look how I implemented it)

    Thank you for your prompt reply 🙂

    Well, additional question – can you limit the filter to a specific column?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    good to hear that this helped!

    Unfortunately, I’m not sure if the way to limit searching will work with this. You could try it. For that, add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "columnDefs": [ { "searchable": false, "targets": [ 0, 1, 2, 3, 5, 6, 7, 8, 9, 10 ] } ]
    

    This would turn off searching in all columns except column 5 (indicated by the missing 4 in that list, as counting the columns starts with 0).

    Regards,
    Tobias

    I’ll try that. Thank you so much!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem! I hope it helps!

    Best wishes,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.