Copy link to clipboard
Copied
Hello, I've search to no avail. I want to highlight certain text lines on a pdf form if the user selects a particular option from a dropdown list on the form. The text I want to highlight is not text fields but just regular text in the document. Thanks!
Copy link to clipboard
Copied
Will this work for multiple fields same drop down? to clarify:
I will need to update the java console for each field using the following:
selectedAnnots[0].hidden = true;
selectedAnnots[0].name = "HG2";
selectedAnnots[0].hidden = false;
selectedAnnots[0].hidden = true;
selectedAnnots[0].name = "HG3";
selectedAnnots[0].hidden = false;
etc...
Then in the dropdown properties add the following to the existing custom valitation script:
var ann = this.getAnnot(0, "HG2");
if (ann) ann.hidden = (event.value!="Model Maintenance");
var ann = this.getAnnot(0, "HG3");
if (ann) ann.hidden = (event.value!="Model Maintenance");
Correct?
Copy link to clipboard
Copied
The first code has to be done in steps:
- Select the first comment.
- Run the code from the Console to set its name to "HG1".
- Select the second comment.
- Run the code from the Console to set its name to "HG2".
- etc.
Copy link to clipboard
Copied
Thank you. I have the code working in the console to make the text highlight visiable and hidden. However, it doesnt work with the drop down.
Copy link to clipboard
Copied
Thank you try67... It was a user error on the code for the dropdown.. I have it functioning for multiple text lines.