Skip to main content
Known Participant
April 11, 2020
Answered

module change values

  • April 11, 2020
  • 2 replies
  • 402 views

Good afternoon to everybody.

i'm trying to find out how to solve a problem

i've a form with several dropdownlist for clothes,and the point is :

if in the first dropdown list  (gender) you choose  if you choose female,the second one (size) should have XS,S,L. on the contrary if you choose male,the second one (size) should have these values R,L,XL,XXL

and a third one (skirt size) should be not visibile.

i know (thanks to this forum) how to make invisible a module,but how i can change its values ???

thanks to all.

fabio

This topic has been closed for replies.
Correct answer try67

Short answer, like this:

this.getField("Size").setItems(["XS", "S", "L"]);

Long answer, read Thom's tutorial.

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
April 12, 2020

Short answer, like this:

this.getField("Size").setItems(["XS", "S", "L"]);

Long answer, read Thom's tutorial.

Thom Parker
Community Expert
Community Expert
April 11, 2020

It sounds like you want to change dropdown list entries based on a selection on another dropdown.

Here is an article on exactly this topic:

https://acrobatusers.com/tutorials/js_list_combo_livecycle/

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often