iFormBuilder JavaScript Tips & Tricks
There may be a situation where one would want to ensure the user enters only Uppercase Text. In order to do this you will be utilizing Client Validation. Please have a look at the example below:
STEP 1. With your form loaded in the Form Builder, add a Text element. We named our example my_text
STEP 2. In the Dynamic Value, put in two double quotes: ""
STEP 3. In the Client Validation, put the following:
my_text == my_text.toUpperCase()
In the Validation Message, you can put whatever message you want the user to see. It has to be surrounded by double quotes:
"Please enter in all uppercase"
PLEASE NOTE: If the user enters Text that is not uppercase, the Client Validation Message will appear telling them to "Please Enter in all uppercase" once they try to hit "Save" or "Done". If the user enters all uppercase text, the Message will not appear.
Comments
1 comment
Is there a way to just convert the text that the user entered to Uppercase without validation?
Please sign in to leave a comment.