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

changing font color after some time.

jglitch
Registered: Jan 7 2008
Posts: 19

Need help.

I've created a dynamic form from LC 8.0. In there I have created a checkbox that will indicate that it is a new entry and the font color in a textfield is red. What I want to do now is, 6 months from the date of the form (or from the last time it was saved) the checkbox is unchecked and the font colour is change to black. Is this doable? If so, can someone provide me with a script for it? I'm not really a good javascript writter (more like cut here and paste there).

Also is it possible to incorporate your own encryption to the form when you create button to send email?

Thank you.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I'll answer your second question first. No it's not possible to use your own encryption on email submits. Good idea though.

Next, Yes it is possible to change a form parameter based on a date. Put a script in the initailize event for the check box. It should look something like this.

var diff = (new Date()).getTime() - event.target.info.modDate.getTime();
var nSixMonths = 182 * 24 * 60 * 60 * 1000;
if(diff > nSixMonths)
{
this.value = 0;
TextBox1.fontColor = "0,0,0";
}

There are diffferent ways to figure out what 6 months is. Take a look at this article.
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script