Skip Navigation

[Resolved] Update AJAX results when filter values change not triggered

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to filter his prefiltered view with his frontend filters.

Solution:

This can be done normally by adding a query filter to your view and setting that query filter to get the value by shortcode attribute.

Then you can add your frontend filters as normal. However when calling your view on the frontend you will provide the shortcode parameter so it can be prefiltered.

Example

[wpv-view name="view-1" wpvtaxonomy1="tax1"]

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by takoL 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#912911

I am trying to do:

Three things
1. Automatically update the filter results when any filter inputs change using AJAX.
2. Add a query filter to the view using a shortcode parameter.
3. Place the view-filter-form on a different part, but on the same page as the view.

When I do all three things together the automatic filtering does not trigger when I change any of the filter values.

Example that does not work:
hidden link
Code on the page is:
[wpv-form-view name="view-1" target_id="self"]
[wpv-view name="view-1" view_display="layout" wpvtaxonomy1="tax1"]

If I remove the shortcode parameter the filtering does get triggered.

Example that works:
hidden link
Code on this page is:
[wpv-form-view name="view-1" target_id="self"]
[wpv-view name="view-1" view_display="layout"]

If I do not separate the filter and the view the filtering also gets triggered.

Example that works:
hidden link
Code in this page is:
[wpv-view name="view-1" wpvtaxonomy1="tax1"]

But if possible I would realy like to do all three things together.
I hope you can help.

Cheers,

Tako

#913083

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

Would you mind providing me with admin access to the website so that I can have a look at this for you ?

Thanks,
shane

#913156

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tako,

I was actually able to replicate this issue on a fresh installation and have made a report to our 2nd tier supporters for further debugging.

Thanks,
Shane

#917962

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Takol,

Sorry for the delay in response.

But could you try adding the parameter to the view filter shortcode as well and see if this works as it works on my end.

Thanks,
Shane

#919765

Hi Shane,

Yes, that works.
Would not have thought of that, but actually does make sense 🙂

Thanks for the help.

Cheers,

Tako