Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Change selection in Dropdown ("Custom calculation script") based on selection in other Dropdown ("Run custom validation script")

JJ_Lieb
Level 1
Level 1

Good day,

I need to modify an existing JavaScript on a 3D PDF Template and just started to learn the basics on JavaScript... Can you please help me with the following:

I've got two Dropdown boxes, Dropdown box_1 got 5 possible selections, Dropdown box_2 got only 2 possible selections

Dropdown Box 1

The user can choose between the following possible selections "Assembly, Disassembly, Highlight Part, Tools & Jigs, View Kit"

Dropdown Box 2

The user can select either "Assembly" or "Disassembly"

If the user select "Assembly" in Dropdown Box 1, but Disassembly is selected in Dropdown Box 2, Dropdown Box 2 selection must be changed to "Assembly" as well.

The JavaScript code in Dropdown Box 2 looks as follow:

var A3D = get3DAnnot('PdfProID_20190502141849');

var LanguageList = this.getField('PdfProID_20190502141849_Languages');

var StepList = this.getField('PdfProID_20190502141849_StepList');

var OldLanguage;

if(A3D.activated)

{if(!StepList || A3D.context3D.StepListFullyLoaded)

   {if(OldLanguage != LanguageList.value)

     {A3D.context3D.ChangeLanguage();

      OldLanguage = LanguageList.value;

  };

   };

};

0 Replies