Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Valentin87

    (@valentin87)

    …and also

    #3: Is it possible to have more than 1 search bar for the table?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For this, you can use a new attribute that the DataTables JS library will bring in TablePress 1.5. That new version will be released shortly, but you can already get the beta at https://tablepress.org/upcoming-tablepress-1-5/
    After updating to that, you’ll have to install the TablePress Extension from https://tablepress.org/extensions/change-datatables-strings/
    With that, you can add

    searchPlaceholder: "Search"

    after

    "search": "Search:",

    to the translation file of your language.

    For your other question:
    Adding another search field is possible by adding this to the “Custom Commands” textfield on the table’s “Edit” screen:

    "dom": 'lfrtipf'

    The extra f will add another search field, see https://datatables.net/reference/option/dom

    Regards,
    Tobias

    Thread Starter Valentin87

    (@valentin87)

    Thank you very much Tobias! Great!

    An extra question: Is it possible to have another text in the Placeholder of my second search bar? Two different texts.

    Olle

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Olle,

    good to hear that this helped!

    Good question, but I don’t think that this is directly possible in DataTables :-/ You would probably need some custom JavaScript.

    Best wishes,
    Tobias

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Watermark in search bar?’ is closed to new replies.