I having a heck of a time trying to figure this out and I hope I can find the answer here.
I have a form that must be static, and the autors want to include an XML submit button. However, they also want to put some kind of security on the button as they only want specific people to be able to click it.
My solution was to use kind of a poor man's password button in the form of a text field:
if (form1.Page1.TextField1 == "password") then;
form1.Page1.xmlSubmit.presence = "visible"
elseif (form1.Page1.TextField1.rawValue <> "password") then;
xfa.host.messageBox("Please enter Administrator password to access XML Submit");
endif
As you can see I was using the exit event of the text field to change the invisible presence of the XML submit button to visible.
From the documentation I have read, namely "Understanding the Differences Between Static and Dynamic PDF Forms" the visible/invisible presence can be used in a static form but as of yet I cannot seem to get this to work.
I am sure there is something simple I am missing, likely that I am wrong about the presence thing working in static forms.
Any help would be appreciated.
Cheers!