You can try this approach:
- Set ID attribute for your input element (eg:
my_input)
- Add HTML element and insert the following code. Make sure that the ID attribute matches the one you have setup for the input element.
<script>
var inputElement = document.getElementById("my_input");
inputElement.addEventListener("input", function() {
this.value = this.value.toUpperCase();
});
</script>
The input value will be updated to uppercase as user types