document.getElementById("txtName").value = document.getElementById("txtName").value.replace(/[^a-zA-Z0-9 ]/g, '').toUpperCase();
Hello,
You can do that as done in the below OML.
Let me know if you have any questions.
Thanks,
Neha
Hi Vivekanandan Kulandasamy,
The script you shared above is working as expected, do you face any issues while using them?
Thanks,Vignesh Prakash.
To correctly use the Javascript, you should have a Javascript input value and an output value,
The input is the Local variable of the input field, and you can use the javascript output to the same value. It's best not to use document.getElementById, since outystems generates the code, en the Id could differ each render.