I've got a customer with data that is all in uppercase and they would prefer that they not be able to type in lowercase. I've got tons of inputs - any way to switch them all globally - via css? - to be uppercase only??
Printable View
I've got a customer with data that is all in uppercase and they would prefer that they not be able to type in lowercase. I've got tons of inputs - any way to switch them all globally - via css? - to be uppercase only??
Actually - maybe this is just a jQuery live-event wired up to a CSS class.
Any one do this with jQuery??
Do I have to trap input keypress events and modify the key to uppercase???
There's a text-transform property in CSS. Check if that works for you.
There's a way of doing this with XSLT.
The solution is discussed here.
Yeah, but that works for rendering... not data entry...
I have to admit that's a pretty odd-ball request.
I think you're right, you may have to use some js to capture a change event ucase the entry, then send it back to the input element. The fun part will be making it work smoothly, and getting the cursor back in the right spot - keep in mind they'll be able to click back into the text and start typing... Another option is to use the blur or lost focus event(s) and then caps it at that point. then it doesn't matter if they click back into the middle of the text and type.
-tg
Wow - needless to say - this is more difficult then it seems. Searched around the internet - even wired up this
Code:$(document).ready(function() {
.
.
.
$('.acs-input-field').live('keypress', keyPress);
}
.
.
.
function keyPress(event) {
var wesThis = [];
}
I might make it a function of the SAVE operation - since SAVE always refreshes all fields with a new GET from the DB.
As the javascript on the page is making up the JSON to send back to the web method that does the SAVE - I can switch up the case at that time.
oh well...