- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
It is not aboout safe.. Your requirement is to check whether a field has value or not. And your code should not consider any spaces in the field as value.
You can write code in FromCalc OR JavaScript to achieve the above..
The above FormCalc condition will be true when a value is entered in the field other than space. So you can write processing statements inside that if block.
You can write a similar code in Java Script to do the same.
var myTestField = YourFormField.rawValue;
//Trim the field value to remove spaces
if(myTestField.replace(/^\s+|\s+$/g,"") == ""){
//Write your code if field is empty.
}
There is no Trim function in Java script you have to write code to trim the field.
Thanks
Srini