How can I either have text entered in a form saved in upper case to my Share Point list or in my workflow when I create a email force the Item Properties of the workflow to upper case. I have a css class on my form that makes everything go to uppercase. But it does not save as such.
Best answer by sean_fieneView original
Thanks for the reply, would I put this on the form?
Save your settings, and then test it out. You'll see the value change when you lose focus on the Single Line Text box.
Make sure you don't fire the 'change' event again when you set the uppercased value.
Just tested this out. The function only fires once changing to uppercase and does not fire again. Great point though!
You guys nailed it, HUGE HELP all around
I guess it's by jQuery's own merit. It tries to uppercase the uppercased value, compares to itself and seeing no change refuses to fire. If it were handcrafted vanilla js, a loop could happen causing some trouble.
I applied the script and changed setting as instructed, but it only works for one box, after I set in the 2nd box the first box no longer work. Is it because the two boxed are right next to each other no gaps in between?
I have 10 text boxes that need to force uppercase, but it only works if the box after the one setup with the setting does not have the setting. e.g. Box A, Box B, Box C
Box A works if box B and C do not have this setting, box B works if Box C doesn't have this setting, Box C works if Box E does not have this setting.
How can I get all these boxes work with this setting?
This solution is using an ID as the selector of the element. An ID is going to be unique to the element, which is why it is only working for one text box. You'll have to change the selector of the text to look for a CSS Class as the one CSS class can be used against many elements.
In the Control Settings of the text box, change the Control CSS class to the class you want to use:
Thanks Sean for the tip.
How do I find the CSS class for the selector?
No worries! On the controls I added to the form, there wasn't a CSS class. You can create one of your own with it's own naming convention. Just make sure to apply the Control CSS Class in the control settings.
Sean, this solution works perfectly for multiple boxes, thanks again!