Upvote 1

Is there a simpler way to do this? Using checkboxes in search query

Answered Nicole 5 years ago

I have a complex search function which considers input of the following types:


  • Text
  • Checkbox
  • Dropdown

Right now I am having problems with checkboxes. The way I am doing it currently is:

  1. Create an event to display search results for the text the user inputs
  2. Create a condition for that event to occur only when the user has ticked a specific checkbox, e.g. "Active" (vs. Inactive). So this means only results with "Active" attribute will be shown.

These steps have to be repeated for every possible condition. i.e.

  • User ticks active
  • User ticks unactive
  • User ticks both boxes
  • User ticks no boxes

Then I have to also consider other search input... including other checkboxes for other attributes.

Is there a better way to do this? I am having trouble putting this together in the query builder since the results are dependant on which boxes the user ticks (if any), so I found using the conditions on the events worked best, but it is also tedious.

Replies (1)
photo
1

That sounds like the best way to accomplish what you're looking for. You could also attach your .vp file here (compressed to .zip/.rar) and we could take a look and see if there's a way to consolidate the conditions.

Leave a Comment
 
Attach a file