• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script check needed

New Here ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Hi all,

 

I would like to have a check on the script for my checklist. It has 16 categories and for each category there are 4 options: 0 , 1 , 2 , 3 (for all the options the value is alike, so 0 =value 0, 1 =value 1, etc.)

 

at the bottom of each option there's a field: subtotal

 now I've added the following code to those fields: 

 

event.value=(this.getField("Top_0").value+this.getField("Vest_0").value +this.getField("Broek_0").value +this.getField("Panty_0").value +this.getField("Schoenen_0").value +this.getField("Haar_0").value +this.getField("Makeup_0").value +this.getField("Bril_0").value +this.getField("Oorbellen_0").value +this.getField("Ketting_0").value +this.getField("Sjaal_0").value +this.getField("Armbanden_0").value +this.getField("Ringen_0").value +this.getField("Nagellak_0").value +this.getField("Riem_0").value +this.getField("Tas_0").value)

 

event.value=(this.getField("Top_1").value+this.getField("Vest_1").value +this.getField("Broek_1").value +this.getField("Panty_1").value +this.getField("Schoenen_1").value +this.getField("Haar_1").value +this.getField("Makeup_1").value +this.getField("Bril_1").value +this.getField("Oorbellen_1").value +this.getField("Ketting_1").value +this.getField("Sjaal_1").value +this.getField("Armbanden_1").value +this.getField("Ringen_1").value +this.getField("Nagellak_1").value +this.getField("Riem_1").value +this.getField("Tas_1").value)

 

event.value=(this.getField("Top_2").value+this.getField("Vest_2").value +this.getField("Broek_2").value +this.getField("Panty_2").value +this.getField("Schoenen_2").value +this.getField("Haar_2").value +this.getField("Makeup_2").value +this.getField("Bril_2").value +this.getField("Oorbellen_2").value +this.getField("Ketting_2").value +this.getField("Sjaal_2").value +this.getField("Armbanden_2").value +this.getField("Ringen_2").value +this.getField("Nagellak_2").value +this.getField("Riem_2").value +this.getField("Tas_2").value)

 

event.value=(this.getField("Top_3").value+this.getField("Vest_3").value +this.getField("Broek_3").value +this.getField("Panty_3").value +this.getField("Schoenen_3").value +this.getField("Haar_3").value +this.getField("Makeup_3").value +this.getField("Bril_3").value +this.getField("Oorbellen_3").value +this.getField("Ketting_3").value +this.getField("Sjaal_3").value +this.getField("Armbanden_3").value +this.getField("Ringen_3").value +this.getField("Nagellak_3").value +this.getField("Riem_3").value +this.getField("Tas_3").value)

 

 

for the total field I used the (2nd) option: Value is the sum(+)

 

now when selecting the options, the total field is calculating the values correctly, only in the subtotalfields there's no value visible, so it looks like it isn't calculating. 

Can you help me with this? Is it something in the code?

TOPICS
Acrobat SDK and JavaScript

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Enthusiast , Sep 14, 2020 Sep 14, 2020

In column 0 you want all buttons to have value 0, in column 1 all buttons have value 1...etc?

so for example if you select all buttons in column 1 result will be 16, if you select all buttons in column 3 result will be 32 and total would be 48, you want it  like that?

Votes

Translate

Translate
Community Expert , Sep 14, 2020 Sep 14, 2020

Try this OUTFIT_CHECKLIST_radiobuttons origineel1 and see if it works for you.

Votes

Translate

Translate
New Here ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

I've noticed now that the file works when I open it in Chrome. But in Safari it doesn't work. Also on my phone it still does not work, but I don't know exactly which application it opens the file in. Is there a way to easily whitelist the document when opening in Safari? The checkbox to allow Java script was already ticked 🤷🏼‍:female_sign:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

For questions about Safari contact the Apple support.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

I've also checked with a friend who has only android devices. For her it gives the same problems. On her laptop the file is opened in Windows System Viewer. On her phone even the boxes with radiobuttons can't be ticked (I also have this problem when opening the file on my phone).

 

So it doesn't seem to be a Safari issue. Could there be  an option in Adobe that needs to be selected to make it work everywhere?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

Hi,

 

Those applications are not controlled by Adobe, the PDF spec is an open standard that anyone can use to create a PDF view, if you are using form features in Acrobat, then the only way to make sure that those features work as expected is to view the PDF in Adobe Acrobat/Reader.

 

On phones even the adobe reader is limited in its form capabilities ( hopefully this will change).

 

But in Windows System Viewer this is created by Microsoft based on the spec, Safari is Apples take on it, 

 

Regards

 

Malcolm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

ok, so if I understand correctly, there's not much I can do to fix this and it is best to just inform the users of this form to open it on their pc / laptop in Adobe or Chrome?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2020 Sep 16, 2020

Copy link to clipboard

Copied

LATEST

Hi,

 

That is correct, only guide the users to use Adobe Acrobat/Reader. As chrome is built by Google, again there is no guarentee that it's PDF viewer supports the features you want.

 

Regards

 

Malcolm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines