Save search parameters on a site for later use.
Intermediate
Last updated: 29 Apr 2025
This example demonstrates how to use query parameters to save and retrieve user input values during a session. The current search values are saved as query parameters in the URL. When a visitor refreshes or navigates back to the site page, their previous search criteria are automatically populated in the user input fields. The site uses a collection, whose data is filtered by the search criteria and then displayed in a repeater.
We added the following to our site:
The code in this file initializes the page elements, listens for events, retrieves the latest user input values, and filters the collection data to display.
In this file, we:
Join the Wix Studio community on Discord, where experienced developers and fellow creators come together to share tips, troubleshoot issues, and collaborate.
Building a coded solution on your own can be challenging. Let an experienced Wix developer build it for you, so you can keep working on your site or business. Visit the Wix Marketplace to find a trusted developer.