Forum Academy Marketplace Showcase Pricing Features

Why is the search box case sensitive

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.

2 Likes

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.

1 Like

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.

Maybe @fayewatson or @NigelG can help us out? Pretty please…

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.

1 Like

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

3 Likes

I think most of our problems can go away by having the contains constraint respond to partial word search instead of word only lookups.

1 Like

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

2 Likes

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

2 Likes

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

1 Like

I’d check your responsive settings using the debug bar. It usually does a good job of showing you what’s going on.