Trying to pull locations from the database using checkboxes

Hi!

I’m building a Yelp-like app for nonprofit services, and I would like to pull locations from the database and mark it on the Google map based on which checkboxes are clicked. Has anyone done this before? I can’t get the search + checkboxes to cooperate and return only locations that fulfill the checked requirements.

Thanks!

If you could put an example in the forum app,…

…or allow public access to your app that would be the quickest way to get help.

I think this link will work, I made it public:

Here is a screenshot of it as well. I want to pull the location first based off of the zip code that is inputted and then only show the ones that match the check boxes the users checked off.

Thanks!

1 Like

Great, thanks. Have found the app :slight_smile:

So … Are you checkboxes inclusive or exclusive ?

So Male checked + Female checked = all listings with Male = Yes + all listings with Female = Yes

or

All listings with BOTH Male and Female = Yes ?

All listings with both male and female = yes if both boxes are checked.

So if someone puts in 94117 and checks male, female, children allowed, I want to show all places near 94117 with the tags male, female, and children allowed.

Thanks.

I added another page (search2) to your app.

And started to build this out.

However I think the issue is going to be limiting the searches to just the ticked boxes. I am assuming that if you don’t tick the box then you don’t want to only limit to “no” values ? Example …

"So if someone puts in 94117 and checks male, female, children allowed, I want to show all places near 94117 with the tags male, female, and children allowed. " … if they have not ticked “Pets Allowed” then you want to show All places that also have EITHER Yes or No in “Pets Allowed” ?

We might have to think of another way to do this.

1 Like

Ohhh, thank you for the thorough answer!

I guess that is an issue. Hmm… Can we say all places that have yes OR no in pets allowed if pets allowed isn’t ticked? But all places that have yes is pets allowed is ticked?

Yes, I think that would work if there was only a couple of options, but with all yours … we would have to write a different search for every combination of the 5.

We might need to use a different method, like a “contains”.