How can I send multiple checkboxes criteria to URL parameters and then use them to filter a RG?

Hello!

I am trying to build a real estate listings app.

In one page users can select what they want to look for, using check boxes. Ex: checkbox1= house, checkbox2= apartment, checkbox3= land lot. Then they hit the search button.

For the search results page I have a repeating group that should only display posts with the criteria selected by the user on the checkboxes of the previous page.

How can I send this checkboxes criteria through URL parameters and then on the next page get them from the URL in order to filter what is displayed on the repeating group?

Any help would be appreciated!

Thanks!

Hi @pachocastillosr. You can create custom states to temporarily hold the checkbox values and then pass the custom state value as URL parameter while navigating to the second page.

On the second page use Get data from URL to define the constraints of the repeating group.

I’ve written a bit it here (https://nocodeassistant.com/filtering-data-using-url-parameters/). This should give you a starting point to build upon.

3 Likes

Here is a post that describes how to take a list of something and send it as a single URL parameter

This way you don’t need custom states and can just simply work with the URL parameters, so no need to set states when a page is loaded or when selections are being made.

The original post used a method that I have since built upon so scroll to the later posts by me updating the method where I demonstrate how to using only a regex pattern.

Save it on the User. Much easier.

But if you have to … (and this may be the same as the above).

Put the tags in the url seperated by commas (or whatever you fancy)

image

Then pull the tags from the URL into a hidden Input to decode it.

image

Then use a regex to split the comma delimited tags into a list (in this case on an RG).

This topic was automatically closed after 70 days. New replies are no longer allowed.