One of my customers reported a Bug about the inappropriate display of the <Case Sensitive> watermark, is cases where fields got configured to allow case-insensitive queries. To be exact, this is the bug:
Bug 20601528 : OPEN UI: CASE REQUIRED PROMPT UNEXPECTEDLY SHOWN IN HOME PAGE SEARCH APPLET
Diving a bit deeper in the subject, in appears indeed that the Bug is yet unresolved. Although it seems on the surface a cosmetic issue, it could be confusing for end-users. All those years they have been allowed to query case-insensitive on a limited number of fields. Did the developers revoke that privilege?!
Interesting enough, in normal views the behavior is correct. If a certain field is configured for case-insensitive searches, the watermark <Case Sensitive> would not be absent. Just on Home Page views containing Search Applets, the issue is present.
After some considerations, I choose to solve this with a Control Plugin Wrapper (PW), which would be fit-for-purpose. Since a PW has a global scope, as it is administered as “Application” / “Common” – we would need to add some simple conditional logic. The PW should only trigger if both the Applet Name for the control would match and the Case Sensitivity mode of the control would be “Case Insensitive”. Otherwise, the PW should do nothing.
Next, I needed to attach the PW to different types of possible controles such as Generic Fields, Picklists, MVG controls… Basically replicate the same statement.
I found that the BindEvents events, provided the appropriate timing for my code. Initially I tried ShowUI, but that event apparently triggered too early. Removing the watermark? Just a simply removing the placeholder attribute. The placeholder is a standard HTML5 feature.
And well, that’s that. No more, no less.
Grab the complete source here. Simply add it to Manifest Administration under “Application” / “Common” and Bob’s your uncle.