Okay
  Public Ticket #3373007
functionality
Closed

Comments

  • Bill started the conversation

    I have created a table with filters and links.  When I link out from a record in a fltered list, and then return, the filter has been cleared.  I expected to come back to the filtered list so I could link out to other records that satisfy the filter.

    Is this what is supposed to happen.  Or do I need Advanced filter addon?

  •  1,819
    Miloš replied

    Hi, Bill.

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    If i understood, when you filter a table to only see a specific list of links,

    then you click in one of the links which redirects the page somewhere else ( in the same tab),

    then when you hit "back" on your browser to come back to this page with the table,

    you would like it to somehow keep the filtered "state" of the table?

    I am sorry to disappoint you, but we do not currently have a built-in solution that will keep the filters from clearing after the page gets refreshed or redirected,

    in this case the table will completely re-load to its original state along with the filters.

    -

    You can predefine a "default" filtering state for the table, a predefined filtering value "on table load",  ( only possible with Premium plugin and Advanced filters)

    and we also have a way to "save a filtering View of a table" with Custom JS code.

    Here is the example we have :

    This bit of custom JS will update the browser url (without triggering a reload)

     to reflect what values have been entered in filters, 

    thereby generating a direct link to the current 'view'.

     Note this only works for separate filter forms, but should only need a couple of tweaks to do a version for the simple in-table filter boxes ...

    jQuery(window).load(function(){
      wpDataTables.table_1.addOnDrawCallback(function(){
        var params={};
        jQuery('.wpDataTableFilterSection').each(function(i, obj) {
          if ( inputbox = obj.id.match("table_1_(.+)_filter_sections") ) {
            if (jQuery(obj).find('input').val()) {
              var key='wdt_column_filter['+inputbox[1]+']';
              params[key] = jQuery(obj).find('input').val();
            }
          }
        }); 
        history.pushState('','','?'+jQuery.param(params));
      });
    });

    This is a custom example that you can use if you have coding skills,

    but please be advised that our support does not cover any troubleshooting / debugging of custom solutions, we can only try to share examples that us or other users made to help you get started or to give you an idea what you can try.

    Also, implementing any filtering for the columns is only possible with the premium version,

    4173984892.png

    but if i understand you are trying this with the Lite Version?

    Could you show us what kind of filters did you set up in your table, with screenshots or perhaps a Video?

    ( If it has any sensitive data, send reply as PRIVATE, for safety)

    Maybe i misunderstood your use-case.

    -

    In regards to built-in options we have for your use-case, i am afraid with the current capabilities it is only possible to either go for a URL Link type column and have it open links in new tab with this "URL target attribute" option :

    9033722949.png

    Then your users can open the links in the new tab, while having the filtered table state remain unchanged in the original browser tab,

    then they can simply close the second tab and will switch to the initial tab where the table will remain as it is/filtered.

    -

    Or if you go for a String Column, then you have to modify/format the source data in the cell with Custom HTML,

    and manually wrap each link in a HTML anchor code, like with "a href" attribute, and manually add the "target blank" attribute to open in new tab.

    Let me know if that helps.

    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    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