Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 94346

PDF Forms JavaScript Help

$
0
0

Hello,

 

I've learned the hard way that JavaScript in forms may not work on tablets (across various OS). I have two custom calculation scripts running in my form, and was wondering if there's another way to write them, or a work around, to where it would work on tablets (I'm no JavaScript expert!)?

 

I have one calculation that counts the number of check boxes in a list (check boxes 20-31) that are checked:

 

var total = 0;

for (var i=20; i<=31; i++) {

if (this.getField("Check Box"+i).value!="Off") total++;

}

event.value = total;

 

From that, I have another calculation that returns a value in another field based on the number of check boxes checked:

 

var a = this.getField("Check Box Count").valueAsString;

event.value = "";

if (a=="1") event.value = "0.00";

if (a=="2") event.value = "300.00";

if (a=="3") event.value = "300.00";

if (a=="4") event.value = "300.00";

if (a=="5") event.value = "300.00";

if (a=="6") event.value = "300.00";

if (a=="7") event.value = "300.00";

if (a=="8") event.value = "300.00";

if (a=="9") event.value = "300.00";

if (a=="10") event.value = "300.00";

if (a=="11") event.value = "300.00";

if (a=="12") event.value = "300.00";

 

I don't know which of the two, or both, is the issue. Is there a work around I could use?

 

Many many thanks in advance for any help!!


Viewing all articles
Browse latest Browse all 94346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>