Thank you both for your answer,
Ulibaehr, it is what i was already doing 'more or less' but instead of setting fields visible or hidden when the page is load i was setting the pages to hidden on preSave, this way even if the user desactivate javascript in acrobat reader he wouldn't see it.
BUT using a simple macro in excel would allow to still read every elements of a form even tho their parent sub / pages are hidden. Only the elements with their properties hidden were not getting extracted.
So now on presave im looping through the whole form and hidding the fields.with this function.
/* ********************************************************************
HideAll Fields
********************************************************************/
function HideAll(pONode) {
if (pONode.className == "exclGroup" || pONode.className == "subform" || pONode.className == "subformSet" || pONode.className == "area") // if one of these must go one node deeper.
{
// Look for child fields.
for (var i = 0; i < pONode.nodes.length; i++)
{
var pOChildNode = pONode.nodes.item(i);
HideAll(pOChildNode);
}
}
if (pONode.className == "field") { // if a field
pONode.presence = "hidden";
}
return 1;
}
Then upon opening the form if the right password is entered i run a cript that show them all and then hide some of em on specific condition.
altrue990 Thanks for your answer, are you refering to the document security property "ask password to open the document"
I offered it to the user but they refused on the ground that they don't want to remember 2 password.
The thing is that the document need to go through 3 approbation. each of them need their own password set by the person below in the approval process. I even suggest them to use a password to open the document an another one to identify them as the person who can read. They refused it on the ground it would be too complicate remembering 2 password even tho one of them would always be the same.