Height Search problem

7 years 10 months ago - 7 years 10 months ago #282752 by stuntlist
Height Search problem was created by stuntlist
Hi,

We have a member database where each member inputs their height. Currently we have a feet field and an inches field.

What our client needs is for people to be able to search for members by height within a + or - 1 inches. So, if the height search is 5'8" it would return members that are 5'7 or 5'8 or 5'9. As people think in feet and inches for height, having the height field in inches only for input is not an acceptable solution.

Can you think of any way that CB 2 could solve this problem? Is there a way to store the height in inches in the database but have the frontend view be able to convert that value into a feet/inches number for display? If height was an integer number then we could use the range search, so the user could enter 5'6 to 5'9 or any range they wanted and not be limited to the + - 1 inch limitation (display value would need to be converted back to straight inches transparently by the software). That would also be acceptable, as long as the range was entered in feet/inches and not just in inches.

Thank you for any help on this.

Please Log in to join the conversation.

7 years 10 months ago - 7 years 10 months ago #282782 by krileon
Replied by krileon on topic Height Search problem
If you use integer fields then and set your userlist searching to simply any or advanced they can search an integer range. Besides that the only way to have what you're wanting exactly is a custom CB fieldtype plugin that has its own custom searching functionality (basically extend the integer field with customized searching), but that's by no means any easy task unless you're familiar with CBs API and plugin structure. Screenshot as follows for integer search range.



Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.176 seconds

Facebook Twitter LinkedIn