Hello,
there is a way to save all my form text input in uppercase?
Thanks
Giacomo
or you can use this like alsoI hope this will helpful for youregards,venkatesaiya
Hi @Giacomo Socini ,Use the ToUpper() function before Create save data in DB.regards,Venkatesaiya
Hello Venkatesaiya,
thanks for your reply.
How can I use this function inside the input field?
Hi,Check this documentation it will help you.
Thanks,Rakhi
Hi Rakhi,
I have to create an assign value from each input of my form? I have a lot of field..
To save data in DB as uppercase, server side ToUpper() is the only way to be sure, as mentioned above. This can be done in your server-side action when saving data.
Client side options are basically all covered in here: https://www.the-art-of-web.com/html/input-field-uppercase/, but in short, you'd need a JavaScript action in each input's onblur/onkeypress/on<X> event, where you replace the contents of input field with it's uppercase equivalent.
If you only need to show the data as uppercase, you can style your form by applying CSS style/class to all input fields: { text-transform: uppercase; }. This option is for looks only, data will be saved exactly as user typed it in.
Evil UX option would be to restrict the allowed characters in your inputs using html5 pattern attribute (pattern="[A-Z]"), but that doesn't guarantee evil users would not be able to input lowercase data as a revenge to your silly decisions.