Copy link to clipboard
Copied
Basically, I have two text boxes. In one textbox, I want to make it so if someone rights a specific number, another number will appear in the other text box.
So in textbox 1, someone writes 30, the other box will automatically write down 45. And if they change it to 31, the other number will change to 63, so on and so forth. The problem is there is no way to do it with simple math, so I have to be able to choose which number corresponds to which number.
Copy link to clipboard
Copied
You can use something like this as the custom calculation script of the second field:
var s1 = this.getField("textbox 1").valueAsString;
if (s1=="30") event.value = "45";
else if (s1=="31") event.value = "63"; // etc.
else event.value = "";