Skip Navigation

[Resolved] Auto select category

This support ticket is created 4 years, 7 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1879275
Screenshot 2020-12-17 at 12.29.04.png

On the following page
hidden link

I want the 2020-2021 to be the default category and be automatically checked. I have added some js see image attached but can't get it to default. Could I add some code to the view to get the my default category to be check or use different js code.

#1879693

Hello, there is no public JavaScript API for Views filters, so there is limited support available for this kind of customization. The only supported way to automatically select some option in a custom search View is to append the proper URL parameter and value to the links leading to the page containing the custom search View. For example, instead of linking to this URL:
hidden link

...create links to this URL instead:
hidden link

That would automatically select the 2020-2021 membership year checkbox option.

Beyond that supported solution, you would need custom JavaScript programming that falls outside the scope of our support forums, per our support policy, since there is no public JavaScript API for Views filters: https://toolset.com/toolset-support-policy/