Forcing a text box to all caps

N

Nolene

Is there a way to force a textbox to display all CAPS regardless of whether
lowercase or uppercase letters are entered into the textbox?

e.g. in a text box for an the State in an address, if the user enters "ca",
or "Ca" or "CA" it will change the text to "CA"
 
A

Andrew Watt [MVP - InfoPath]

Is there a way to force a textbox to display all CAPS regardless of whether
lowercase or uppercase letters are entered into the textbox?

e.g. in a text box for an the State in an address, if the user enters "ca",
or "Ca" or "CA" it will change the text to "CA"

Nolene,

One way is to create a rule for when the value in the text box
changes, then use the XPathtranslate() function in a formula

translate(., "abcdefghijklmnopqrstuvwxyz",
"ABCDEFGHIJKLMNOPQRSTUVWXYZ")

to change all occurrences of lower case characters to upper case.

Andrew Watt
MVP - InfoPath
 
A

Andrew Watt [MVP - InfoPath]

Greg,

You're right. That would work too, if the "Update this value when the
result of the formula is calculated" check box is checked.

Andrew Watt
MVP - InfoPath

Actually, this can be done by simply setting the same translate() function in the default value of the text box. No rule required.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



Is there a way to force a textbox to display all CAPS regardless of whether
lowercase or uppercase letters are entered into the textbox?

e.g. in a text box for an the State in an address, if the user enters "ca",
or "Ca" or "CA" it will change the text to "CA"

Nolene,

One way is to create a rule for when the value in the text box
changes, then use the XPathtranslate() function in a formula

translate(., "abcdefghijklmnopqrstuvwxyz",
"ABCDEFGHIJKLMNOPQRSTUVWXYZ")

to change all occurrences of lower case characters to upper case.

Andrew Watt
MVP - InfoPath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top