Okay
  Public Ticket #2037904
Save Filter Form Results to Variable / Filter 2 Tables w/ 1 Filter Form
Closed

Comments

  • Christian started the conversation

    Hello,

    How would I go about saving the filter form selections to a variable to be used elsewhere on the site?  Is there a hook I can use? Or maybe catch the value using php like you can with other inputs?

    Also, how do we filter two tables with the same filter form?  I see the charts will change/filter based on what the table form has selected, but I can't find the option for when there are multiple tables on one page.

    Thanks for any help!

  •  2,572
    Aleksandar replied

    Hello Christian.

    You can take a look at the video in our documentation, around 3:00 minute mark. You'll see how you can define placeholders and use them in a filter. You can also define them in the shortcode when you're placing the table on a page, like this:

    [wpdatatable id=12 var1=150 var2=350]

    Another option of filtering the table without actually setting the filter to be %VAR#% is to place it in a URL, as a predefined filter when you're loading the page. More info about that can be found here.

    If there's something else you wanted to ask, and I missed the point, please explain the use case of the filters in placeholders.

    Unfortunately, filtering multiple tables with a same filtering form is not possible at the moment. Every table has its own filters, so they appear either inside the table (below the header, or in the footer), or in a form above the table.

    Each chart is being created from a single table, so when you filter that table, the chart will respond with corresponding values.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [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