Please , i have another couple of questions but on pdf's security and saving:
My first question,how can i build a prompt that popup when the form is loaded or opened which ask the user for a certain password which used to show/hide or activate/deactivate certain fields or objects within the form?
My second question, how can i save the form with a name derived from a field value within the form or from using a user name that entered by a prompt popup when the form is opened or initialized?
Any ideas, please!!!
Thanks
Mustafa
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Mustafa,
I have an example here where the script in the click event of a button asks the user for a password. If they enter the correct password then four locked fields are made available to them.
You could copy this script to the docReady event of the root node (generally "form1"). This would then fire every time the form is opened.
One thing to bear in mind is that this solution uses a function (called "hex_sha256"), which is inside a Script Object (called "soHASHING_SHA256").
this function allws you to use hash keys, so while the user types in the password (in this case "1234"), the script converts this to a hash key "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4".
this means that if someone examines the form they cannot determine the password.
Start off by copying the button and the script object into your form. Then try moving the button script into the docReady event. Have a look in the LC Designer Help for information on script objects.
The second question is possible, but it is considered to be a security risk, so you will need to use a Trusted Function (which is in a separate JavaScript file, that has to be stored on every computer that uses the form). This is very difficult to maintain. There is a long thread here: http://forums.adobe.com/message/2266799#2266799
Hope that helps,
Niall
Views
Replies
Total Likes
Hi Mustafa,
I have an example here where the script in the click event of a button asks the user for a password. If they enter the correct password then four locked fields are made available to them.
You could copy this script to the docReady event of the root node (generally "form1"). This would then fire every time the form is opened.
One thing to bear in mind is that this solution uses a function (called "hex_sha256"), which is inside a Script Object (called "soHASHING_SHA256").
this function allws you to use hash keys, so while the user types in the password (in this case "1234"), the script converts this to a hash key "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4".
this means that if someone examines the form they cannot determine the password.
Start off by copying the button and the script object into your form. Then try moving the button script into the docReady event. Have a look in the LC Designer Help for information on script objects.
The second question is possible, but it is considered to be a security risk, so you will need to use a Trusted Function (which is in a separate JavaScript file, that has to be stored on every computer that uses the form). This is very difficult to maintain. There is a long thread here: http://forums.adobe.com/message/2266799#2266799
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
you might have a look on this example too.
It explains how to encrypt all form fields in one go with RC4 and different hash algorithms.
http://thelivecycle.blogspot.com/2011/04/rc4-encryption-with-salting.html
Dear Niall , Thanks alot i really appreciate your fast reply , now i'm trying the link and the example, its look very useful.
Thanks again
Mustafa
Views
Replies
Total Likes
Dear radzmar , Thanks alot i really appreciate your additional example.I'm happy to join a forum with such helpful friends.
Thanks again
Mustafa
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies