Copy link to clipboard
Copied
Hello,
How can I make such combo box(drop down box), if user selects one item from a combo box and then one or more special fields appears? I am using Adobe Acrobat XI Standard.
Thank you!
Copy link to clipboard
Copied
You can use something like this as the dropdown field's custom validation script:
if (event.value=="Item 1") {
this.getField("Text1").display = display.visible;
this.getField("Text2").display = display.visible;
} else {
this.getField("Text1").display = display.hidden;
this.getField("Text2").display = display.hidden;
}
Copy link to clipboard
Copied
Thank you, it was helpful.
Now I have another issue regarding the same dorpdown box.
Is it possible to make it like this:
1)if I select from one box "Item1" then another box "Text1" is visible BUT not fillable and with filled text and "Text2" is visible and fillable
2)if I select from one box "Item2", box "Text1" and "Text2" are invisible.
I am using Adobe Acrobat XI Standard.
Thank you!
Copy link to clipboard
Copied
Try this :
if(event.value == "Item1"){
this.getField("Text1").display = display.visible;
this.getField("Text1").readonly = true;
this.getField("Text2").display = display.visible;
} else if(event.value == "Item2"){
this.getField("Text1").display = display.hidden;
this.getField("Text2").display = display.hidden;
}
Copy link to clipboard
Copied
Thanks!
Now this "Text1" box is not fillabe, as I wanted, but it is empty. How can I add a permanent text to the box "Text1"? E.g. "Reason"
I tried to put it in to "Options" tab "Default value:", but it`s not working
Copy link to clipboard
Copied
Normally "Options" tab "Default value" should work. It is working for me.
But as a workaround, you can do it through below script also :
this.getField("Text1").value = "Reason";
if(event.value == "Item1"){
this.getField("Text1").display = display.visible;
this.getField("Text1").readonly = true;
this.getField("Text2").display = display.visible;
} else if(event.value == "Item2"){
this.getField("Text1").display = display.hidden;
this.getField("Text2").display = display.hidden;
}
Copy link to clipboard
Copied
Now, it works!
Thank you!
Copy link to clipboard
Copied
OK, one more problem, how do make created box frames more thinner?
First I made my document in Word(I have tabel with frame, see example) and then created fillable PDF(Save as Adobe PDF). All my created fillable fields/dropdowns are without frames.
CUSTOMER
Name, Surname | Date of birth |
Application type | dropdown<Item1> |
Then I added custom vaidation script(described before) - if user selects "Item1" - 2 more boxes("Reason" and fillable "Text2") appears (if user selects "Item2" no extra boxes).
For those extra boxes I have to add a frame(because without frames it looks weird), BUT in "Text Field Properties" "Appearance" Tab - Line Thickness: "Thin" is not so thin as I need. As you see visually, last boxes frame is different(thicker) as others.
Is it possible to fix it somehow or I need another program?
I have worked so hard with this Form, I do not want to give up now!
I am using Adobe Acrobat XI Standard.
Thank you!
Copy link to clipboard
Copied
You can't make it thinner than that. Your only option is to set it to None and then just use the graphic elements in your page as the frame.