[Résolu] Parametric Views Search Select option on page load
This support ticket is created Il y a 4 années et 7 mois. 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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
I'm actually very surprised this isn't a feature build into views, because in a lot of cases it would be required. However I have a view that is a CPT list with a taxonomy filter. On pageload I need to trigger the filter to select the "default" view as you don't have a way to load the page with a default selected(which would be nice) ...
I'm ok writing some JS here just wondering if you can provide me with the function that is being run on a radio button select on a form set to update on ajax so I can trigger that function on pageload to simulate a default being loaded. Using query strings is not an option in this situation.
So I added that which does give the checked status and my styles for the active state are triggered however it doesn't force a reload of the view, which was where I also got to when trying to setup initially.
We are triggering the .trigger('change') - change event of radio button so it should be automatically triggered. Do you see the filtered posts on your page or you just see that the radio button is checked but the results are not filtered?
yes, exactly like you say I "just see that the radio button is checked but the results are not filtered?" You can see the team section here lien caché now, if you see it Appears to be preset on Management, but you have to click off then back on to actually trigger the update of the filter.