Copy link to clipboard
Copied
Hi there,
I have a PDF form with multiple text boxes to that are to be filled out be recepient. There is also a Drop-Down option at the top of the form. We want certain options selected on the drop down to impact the text boxes that are avaiable to fill out by the recepient.
Here is the process on the form. Currently there is a drop down option for "type of work". The text boxes below are to be filled out be the recepient with the information that is needed. Currently, when a "type of work" action is selected, all options are still avaiable. We need to be able to filter when a "type of work" option is selected the text boxes that are avaialable to that specifc option.
From all of my research, this needs to be done through JavaScript, is this correct?
Is this possible at all?
Thank you!
Copy link to clipboard
Copied
As validation script of dropdown field, you can use something like this just change text field names to your actual field names (blue) and dropdown choices to your actual choices (red):
this.getField("Text1").display = event.value == "type of work" ? display.visible : display.hidden;
this.getField("Text2").display = event.value == "type of work" ? display.visible : display.hidden;
this.getField("Text3").display = event.value == "type of work 2" ? display.visible : display.hidden;
this.getField("Text4").display = event.value == "type of work 2" ? display.visible : display.hidden;
Copy link to clipboard
Copied
I have a similar situation. I wasn't able to make the script work.
It would be extremely helpful if you could post a sample PDF.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
Hi,
Yes this is possible and doable with Acrobat JavaScript.
Basically, you may employ a custom format script or custom keystroke script that executes from the dropdown menu when the user makes the desired selection.
You can have all textfields as readonly, for example.
But when the "type of work" item is selected in the dropdown menu, the fields (that you instruct with the script) will become fillable.
Conversely, selecting any other item(s) from the list will make the intended textfields readonly again.
Is this the intended workflow?