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
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).
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