It appears that the search box is case sensitive. how can i disable this?
Hello All,
Did anyone manage to resolve this?
Itâs not a feature - case sensitivity is something that has to be overcome by writing your own code (or in this case, having Bubble implement a feature). Has anyone developed a workaround for case sensitivity in the search?
I recently started using the search bar as a way to filter a repeating group that calls info from an API. Having a way to get around case sensitivity would be a HUGE improvement in user experience.
Thanks @Kfawcett! Thought it doesnât completely fix it. The search either has to be ALL caps or ALL lowercase. So, if Iâm searching for a name (which I would with my app) and I capitalize the first letter, it fails.
When you add the item to the DB, you can force it to be all upper or all lower. Then, when the user types in the search bar, you change the value to either all upper or all lower, depending what you chose for the DB. That should take care of it, yeah? You want to be in a situation where you logic handles the upper/lower differences, without worrying about what the user entered.
Hmm, I donât see how to change the input to all lowercase. Plus, it works dynamically, it doesnât hit the DB first.
Currently I have it like this:
I havenât tried this, but are you not able to doe âInput Enter Drummer nameâŚ's value:lowercaseâ ?
I do have that in the search constraint. I canât find an way to apply that to the input field itself, if thatâs what you meant.
Looking at your logic above, you are only checking to see the lowercase version of the value in the database, not the lowercase version of the input value.
In your condition, you have 2 different entities:
- This Video Artist Name
- Input Enter drummer name
Each of those needs to have the â:lowercaseâ applied to it for it to work, I believe.
Doesnât give me the option of using the :lowercase on the âinput Enter drummer nameâ. I did add the âcapitalized wordsâ option, which takes care of capitalizing the first letter of a name. But, if someone searches jAson, the search still fails. It would be cool if there was a âignore caseâ option.
Just tried this too-- in the advanced constraint I wasnât able to do 'This Videoâs Drummerâs Name contains Input Drummerâs Name (:lowercase, :capitalized, :uppercase) either, but I was able to flip it so itâs: âInput Drummerâs Name:lowercase contains This Videoâs Drummerâs Name OR Input Drummerâs Name:uppercase contains This Videoâs Drummerâs Name OR Input Drummerâs Name:capitalized contains This Videoâs Drummerâs Nameâ. I tried on mine and it seems to work, even with weird things like âjAsonâ showing âJasonâ as you mentioned, but double-check!
*I think one more statement needs to be added to the end for it to work:
âOR 'This Videoâs Drummerâs Name contains Input Drummerâs Nameâs valueâ
*Edit: Itâs best to use Nigelâs way (next post) with a hidden input that converts the search value to an uppercase value in the hidden input
I think most of our problems can go away by having the contains constraint respond to partial word search instead of word only lookups.
I am not actually convinced this works in all cases.
Another wayâŚ
Convert the input into uppercase in âhiddenâ input, then compare with :uppercase values from the databaseâŚ
https://buildingonbubble.com/block/search-ignoring-case-1473495213720x341425763853008900
You can sort of do partial search, but it wonât work on multiple words, just the beginning.
So you search for :truncated where the number of characters to truncate are the number of characters in the input.
https://buildingonbubble.com/block/partial-search-1473506527266x490930349462519800
Hey Nigel, I couldnât get the link to the editor (or the preview) to work on your search. Just letting ya know.
Thanks @NigelG!! That totally worked! The uppercase bit I mean.
Now, I have a new problem. Iâve got some fields on the left side, but when I view the page they are moved to the right.
It should be on the left sideâ
Thanks!
Not the most elegant but will definitely give it a try. Would love an option to have case sensitive on/off
Iâd check your responsive settings using the debug bar. It usually does a good job of showing you whatâs going on.