Okay
  Public Ticket #3683169
Control Column visibility in Front end
Closed

Comments

  •  3
    Miroslav Kulanga started the conversation

    Is it possible to control column visibility in front end via JS.

    E.g. If I want to hide or show certain columns via code?

  •  1,846
    Miloš replied

    Hi Miroslav,

    My sincerest apology, there was an error on this ticket from my end - I wrote a reply, but it somehow did not get sent properly.

    This will not happen again, thank you very much for your patience.


    Sorry to disappoint you on this, but at the moment, there is no built-in way to achieve dynamic column visibility as you described via JS.


    At the moment, you can only allow front-end users the capability to hide or show columns through a checkbox via the Table Tools "Column visibility" button.

    If this button is turned on for the table, your front-end table users will be able to toggle the visibility of the table’s columns. 

    Please note that it also includes the columns that you’ve hidden from the back-end.

    You can un-select the button to hide the column and select it back to show it.

    8869562831.png


    You can make a future development suggestion, but we can't say an ETA.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables