These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

I need users to fill a form and save it, but then it shouldn't be anymore editable

Devil4CE
Registered: Nov 21 2011
Posts: 6

Hi people,
 
I created a form that I put on-line,
 
What I need:
 
The users should be able to fill this form and save it on their pc and it should be possible for them to fill out later on.
Now when they send it me back I want that the form isn't anymore editable. Because that form should be unique and certified to be the original one...
 
I don't know how to explain better my request, but I would be really great full if someone can help me with this little (big) problem.
 
Thank you all for replying.

My Product Information:
Acrobat Pro 10.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
I'm assuming the users are going to be using Reader... In that case what you can do is use a simple script to make the fields read-only just before submitting the file. You should be aware, though, that this isn't a 100% fool-proof solution, but it's the best you can get with Reader.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Devil4CE
Registered: Nov 21 2011
Posts: 6
Thank you for your reply,

Could you eventually tell me how does this script look like, and where should I put it, should I put a button where they can use "mail-to" my address?

Thx you so much for taking your time!
Devil4CE
Registered: Nov 21 2011
Posts: 6
Yes they use most of time reader...
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It was discussed many times on these forums... But yes, basically you create a button and assign this code to it as a MouseUp action:

  1. for (var i = 0 ; i < this.numFields ; i++) {
  2. var f = this.getField(this.getNthFieldName(i)) ;
  3. if (f.type != "button") {
  4. f.readonly = true ;
  5. }
  6. }
After that you can add the code to submit the file, but that depends on how you want to submit it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Devil4CE
Registered: Nov 21 2011
Posts: 6
Sorry I'm really a noob with Java scripting, I want to know if I need to change any on this code


for (var i = 0 ; i < this.numFields ; i++) {
var f = this.getField(this.getNthFieldName(i)) ;
if (f.type != "button") // do I have to change the word between " " with the name of my button which I put on my PDF? name of button is "Valider"
{
f.readonly = true ;
}
}

Thx for your reply!
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Don't change anything.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

try67
Expert
Registered: Oct 30 2008
Posts: 2398
What you do need to do is add the action that submits the file, after this script executes.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Devil4CE
Registered: Nov 21 2011
Posts: 6
Thank you so much try67, you were really helpful! :-)