Skip Navigation

[Resolved] Archive default filter value is not applied.

This support ticket is created 6 years 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.

This topic contains 2 replies, has 2 voices.

Last updated by carletto0282 6 years ago.

Author
Posts
#630123
Schermata 2018-03-30 alle 17.19.08.png
Schermata 2018-03-30 alle 17.18.50.png

Hi,

you can see here

hidden link

An archive for an events custom post type I created on this site.
The thing is the default values I set for start and end date are not working on page load.

Just clicking on "Applica i filtri" red button - Apply Filters - makes the whole thing work fine.

I add a screenshot of the filters and of the filter HTML with the default values set.

Please help

Best regards
Carlo

#630210

This is not intuitive but expected.

At the moment you load your page with the View, the search is not triggered and will not filter.
As soon you press the submit button or change values (and have AJAX enabled) the search works.

I understand that this is not intuitive but it is expected.
This is not a Query filter, it's a Custom Filter that is not yet triggered when you just load the View.

I understand that this may confuse everyone and will discuss with the team what we can do in regard.

Do you think a hint is enough?
(In the GUI, when you insert a default value).

#637949

Hi Beda,

thanks for your reply.

Actually what you are saying sounds to me like a bug.
I mean if I set a default value I expect to see that value set as default with no further actions needed.

I understand you have set a different behaviour. Ok good to know.
There is definitely some clarification needed. A popup or a hint in the GUI will be a good start.

But I suggest to evaluate an option to "apply the default value on load" solution otherwise the "default" value is quite annoying.

On my part, since I need the default value loaded, I'm studying two possibile solutions:

- the first one is to generate a custom dynamic url to the page that includes a query string applying the filters values;
- another solution is to change the view behaviour to update through AJAX and add a little JS function that submit the filter form on the first load.

Again, thank for your help I hope you can keep me updated on further decisions by the team on this issue.

Best of all
Carlo

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.