Text only in field
Posted: Mon Sep 22, 2008 3:25 am
I have a card that requires the user to enter some text to fill out some variables in a form.
I encountered a problem where the user could hit the return key,
placing a CR after the entered text.
I am guilty of doing this myself, while filling out forms, most of the time it would not matter however in this case, a CR is not wanted.
I began to wonder if there were a way to make sure that there is not a CR in the field, as the rest of the script depends on each line of the script to be on its own line.
So a CR in a text field, would create a new line where it is not wanted, which breaks the script.
Any thoughts on this, I tried a couple of different things, but it appears that even if you use the IF statement the field will still accept a CR.
Thanks in advance for any suggestions.
I encountered a problem where the user could hit the return key,
placing a CR after the entered text.
I am guilty of doing this myself, while filling out forms, most of the time it would not matter however in this case, a CR is not wanted.
I began to wonder if there were a way to make sure that there is not a CR in the field, as the rest of the script depends on each line of the script to be on its own line.
So a CR in a text field, would create a new line where it is not wanted, which breaks the script.
Any thoughts on this, I tried a couple of different things, but it appears that even if you use the IF statement the field will still accept a CR.
Thanks in advance for any suggestions.