Page 1 of 1

Searching a number range in CGUserDirectory

Posted: Thu Nov 19, 2020 4:29 pm
by webform
Is it possible to searching (filtering) a number range in CGUserDirectory in frontend in an user friendly way?

I doubt the casual user is able to use Regular Expression to search a number range, so i would like to make some kind of GUI for the search page in frontend, so the user just have to insert the number range they want to search/filter for.

Re: Searching a number range in CGUserDirectory

Posted: Fri Nov 20, 2020 3:44 pm
by DIGI3
Not that familiar with CGUD but could you create min & max fields (or perhaps a slider if you're fancy) for the visitor, a hidden field with the regex, then modify the regex with javascript based on the visitor's input?

Re: Searching a number range in CGUserDirectory

Posted: Fri Nov 20, 2020 4:02 pm
by webform
I think your on to something!

A Min. and Max. field and a regex generator handling the input (Age range). I've just got to figure out to how to handle the age range input when i only have a birthday/year field for each user. ???

Maybe a dropdown for the Min. and Max. field with age ranges (0-100) and the selected value a calculated year based on current year. Or something like that ???