Coding for Right or LEft
I have a form where I want an answer in lateralside1 but the decision of what types into this field is from text 23. IF Text23 is <0 I want Right in Lateralside 1 and if >0 then I want the word Left. I tried this script but it didn't work. Any one know what I am missing? Thank you in advance.
var number = this.getField("Text23").value; // Get the value from Text23
if (number > 0) {
event.value = "Left"; // If the number is greater than 0, display "Left"
} else if (number < 0) {
event.value = "Right"; // If the number is less than 0, display "Right"
} else {
event.value = ""; // If the number is exactly 0, leave the field empty
}
