Remove A Widget (Field Instance) Using JavaScript?
hello ,
i trying createt javascript action (sequence) removes unwanted fields forms, fields share same name. want remove widgets/instances. can remove fields "removefield()" function not work widget/instance of field; instaces of field removed.
for example:
there 2 fields on form. have same name called "address".
so there 2 fields these ids:
address#1
address#2
i remove first 1 only.
so tried function , fails:
doc.removefield("address.1");
i tried:
doc.removefield("address#1");
is trying not supported or there way it?
i using acrobat x professional on windows 7.
thank you.
as you've found, removes instances.
some ideas other approaches:
1. before removing field, collect information ones want retain , recreate ones want after removing them. may not feasible since can't field actions, , can recreate javascript actions, unless import fdf sets field actions.
2. flattenpages method can used remove non-printing fields page, first set field in question non-printing (field.display = display.noprint) , flatten page has instance want remove. if have other type of annotations on page, may have deal them well.
More discussions in JavaScript
adobe
Comments
Post a Comment