Explore the community Forums Lectora Lectora Questions & Answers All letters uppercase except last one Reply To: All letters uppercase except last one

#388520 Score: 0
Profile photo of Tim K
Tim K
Member
contributor
beginner
intermediate
advanced
friend finder
junior moderator
advocate
wise owl
curious george
Group Member
354 pts
@timk

You can use CSS instead of javascript. Add an external html object of the type Meta tag and insert this:

<style>
input{
text-transform: uppercase;
}
</style>

This way the entry field will only ever display uppercase instead of changing it after input.

The CSS above will change all input fields, but you can replace “input” with “#entry60id” if you only want to change that one entry field.

Then use javascript to change the variable to uppercase as well. Add an action to the field:
On: Show
Action: Run javascript
Javascript:

el = document.getElementById("%HTMLNAME%id");
el.onkeyup = function(evt) {
VarEntry_0001.set(el.value.toUpperCase());
};