Answered
I have a table where Users can add or subtract rows as needed. If there is no data in the Part# field, then the Inventory Location field is optional. If there is text or numbers in the Part# field, then the Inventory Location field is required. Here's the code I tried to use on a change event but it failed:
var Empty = /^\s*$/;
if(Empty.test(event.value)){
this.getField("InvLoc").required = false;}
else{
this.getField("InvLoc").required = true;
}
I also tried the validation event but that caused the software to hang.
Can anyone supply me with the correct Javascript code?
Thanks in advance for your help
Gillian
To make the field required, you can use property "mandatory".
Property will accept text values of the followings;
"error" : field requires value
warning : field is recommended to be filled
disabled : optional