Sum one Field based on another's input
i have question. possible have specific field populated specific number based on input of antother field. example. in field #10 have input number. if number 1-365 it's ( f) if number 366- 392 it's ( d) if it's 393-460 (c) if it's 461-500 it's ( b) if 501-700 it's (a). in field #11 want populate letter based on input of number input in field#10. possible in javascript or how?
thank in advance
sure it's possible. custom calculate script text field be:
(function () {
// field value, number
var val = +getfield("text10").value;
// set field's value
if (val < 366) {
event.value = "f";
return;
}
if (val < 393) {
event.value = "d";
return;
}
if (val < 461) {
event.value = "c";
return;
}
if (val < 501) {
event.value = "b";
return;
}
if (val < 701) {
event.value = "a";
return;
}
// default
event.value = "";
})();
More discussions in JavaScript
adobe
Comments
Post a Comment