Avoid searching form fields (form field contains search term)
Hi everybody, hope someone can help with this one:
I have made a search field integrated into the PDF pages and am currently using this bit of script on a button next to the search field:
var textToSearch = this.getField("searchterm").valueAsString;
if (textToSearch!="") search.query(textToSearch, "ActiveDoc");
This results in the "Full search" in Acrobat coming up listing all found results within the document, which is great, BUT, it also finds the searched term on every page, because the search field is duplicated on all pages. I am thinking maybe one could pass the search term from the field into a (global?) variable and then clear the search field, so it wouldn't be found on all pages, but the search term would still be saved in the variable. Or maybe there is a way to specify that Acrobat should not search form fields?
Any help would be greatly appreciated!
: )erome
