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

Java script in form not functioning always

New Here ,
Apr 06, 2018 Apr 06, 2018

I have a form that has several calculated fields, it works fine in Acrobat Pro, but very hit and miss in other programs. The form is an insurance application and it calculates the premium dependent on the "State" and the "Deductible" ("ded_1"). In Mac, the whole form seems broken, not just the formulas, but the layout too.

I'm having issues with one particular field "ded1".

The options of a drop down list field "ded1" is dependent on the data input of another field "State1". i.e. you input 'mi' it changes it to 'MI' and sets the options in 'ded1' to $5,000 & $7,500. you input any other state it converts it to upper case and sets 'ded1' to $2,500

I've placed this code in the 'Validate' tab of the 'State1' field.

event.value = event.value.toUpperCase();   // Sets the entry to upper case.

// Sets the options for the deductible field.

switch (event.value) {

    case "":

        this.getField("ded1").setItems([""]);

        break;

    case "MI":

        this.getField("ded1").setItems(["$5,000","$7,500"]);

        break;

    default:

        this.getField("ded1").setItems(["$2,500"]);

        break;

}

The pdf can be viewed here

https://www.statesideapm.com/bi-application-pdf

TOPICS
Acrobat SDK and JavaScript , Windows
543
Translate
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 ,
Apr 06, 2018 Apr 06, 2018

Unless that other program is Adobe Reader you should report this issue to the developers of these programs. It has nothing to do with Adobe.

Translate
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 ,
Apr 06, 2018 Apr 06, 2018

Thanks, for replying so quickly.

It certainly doesn't work on Adobe Reader on Mac. Nor in browsers.

Do you think it might help if the formula were in the 'ded1' field rather than the 'State1" ?

Obviously it would need to be different.

Translate
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 ,
Apr 06, 2018 Apr 06, 2018

What version of Reader are you using?

Translate
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 ,
Apr 06, 2018 Apr 06, 2018

Unfortunately we have no idea or control over that. it's used by clients.

We tell them to use the latest version of reader and provide a link to download it. But they're mostly incompetent.

Translate
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 ,
Apr 06, 2018 Apr 06, 2018
LATEST

Well, if they use a relatively new version of Reader it should work for them.

If not, they're on their own...

Translate
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