• Resolved jcm01

    (@jcm01)


    Hello Tobias,

    When working with column headers which includes HTML code, column filter widgets will show the HTML code instead of the text displayed on the table.

    A simple example would be to add a link in the header column which needs to be filtered (See included link).

    My goal is to add tooltips in column headers.

    Thanks

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this simply is that the JS code for the ColumnFilterWidgets is rather “stupid” and only interprets the full cell content.

    Your only real chance here would be to create duplicate of the column without the HTML in the header cell, and then hide that column (e.g. using CSS code) and then also hide the “wrong” dropdown of the ColumnFilterWidgets, using the Shortcode parameter to exclude columns that is mentioned on https://tablepress.org/extensions/datatables-columnfilterwidgets/

    And something else: It seems that, from copy/paste, your Shortcode has some extra HTML code around it that should be removed. For that, please go to the “Edit” screen of the page with your table and switch from the “Visual” to the “Text” editor. Then, remove the <pre> and </pre> HTML tags around the Shortcode.

    Regards,
    Tobias

    Thread Starter jcm01

    (@jcm01)

    Hi,

    Thank you very much for your assistance. I was able to successfully implement your solution on the test table and will soon start with my main table.

    As for the “pre” HTML tags, thanks for the suggestion. Luckily this should be the exception since I only use the built-in editor, which defaults to “Visual”, for testing purposes ??

    Enjoy your evening.

    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 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ColumnFilterWidgets incorrectly displays headers containing HTML code’ is closed to new replies.