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

Need additon to this script to set text fields to read only.

bensimmons99
Registered: Jun 2 2010
Posts: 28

I currently using this javascript to timestamp a date field upon signing. However, I cannot also check the other box in the selection that will make fields read only. Therefore, what is the javascript command that sets fields to read only, and how would i add it to this script?

var f=this.getField("CURRENTDATE");{
f.value = (new Date()).toString();
AFDate_FormatEx("h:MM tt, mmm dd, yyyy");
}

My Product Information:
Acrobat Standard 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
var f=this.getField("CURRENTDATE");f.value = (new Date()).toString();AFDate_FormatEx("h:MM tt, mmm dd, yyyy");f.readonly = true;

(I've also removed the unnecessary curly brackets)

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