Is there any way to default to capital letters?

  • 1
  • Question
  • Updated 6 months ago
  • In Progress
Hi everyone! 

I was wondering if there is any way to force capital letters on a text input. 

May be a silly question but sure would be happy to know.
Photo of Matt Small

Matt Small

  • 1,182 Points 1k badge 2x thumb
  • mighty fine!

Posted 6 months ago

  • 1
Photo of Louis Skelton

Louis Skelton

  • 4,786 Points 4k badge 2x thumb
Not sure on your particular use case but one non-javascript related approach that kinda gets you there would be to use custom Skuid-UI fields like so:

1. Create a UI-Only field of type text which you then put on your page layout
2. Create a UI-Only field of type formula which uses the formula:

UPPER({{YOUR_Ui_TEXT_FIELD}})

3. Create an action on that model which updates your Salesforce field that you want in capital letters whenever the Ui-Only text field is updated.

Dig? The issue with this is it's not validation but it does enforce capitalised output.
(Edited)
Photo of Matt Small

Matt Small

  • 1,182 Points 1k badge 2x thumb
Hi Louis, 

Good suggestion but unfortunately this wont fix what I am trying to achieve. It is using caps I intended to block the iphones predictive text. 

Any more suggestions?
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Matt,

I have not tried this myself, but it looks like you can add an attribute to the input to turn off 'autocapitalization'.  See this link-> https://stackoverflow.com/questions/4722623/disable-predictive-text-on-iphone-for-a-form-field

Here is an example:
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off">

Thanks,

Bill
Photo of Luzie Baumgart

Luzie Baumgart, Official Rep

  • 1,310 Points 1k badge 2x thumb
Thanks Bill for sharing your idea!
Matt, was this helpful for you?