coma12
asked on
500 pts. Making text field show 2 weeks ahead of current date
Hello,
I have a text field in an acrobat 6 file called "today" and I want it to show 2 weeks ahead of the current date in MM/DD/YYYY format. Below is a solution given to me by khkremer. Can anyone add to this answer or give me another solution?
-------------------------- ---------- ---------- ---------- ---
select the Form tool: "Tools>Advanced Editing>Forms>Text Field Tool" and draw a rectangle on your PDF document. This will bring up the preference dialog for this form field. Select the "General" Tab and specify "Today" as the field name. Look around on the UI, select all the tabs, but you don't need to make any more changes here. Close the dialog. Select "Advanced>JavaScript>Docum ent JavaScript". Give the script a name (e.g. "OnOpen") and click on the "Add" button. Replace the complete function stub with this line:
this.getField("Today").val ue = "today's date";
Save the file, close it and reopen it. YOu will now have the string "today's date" in your field. This information plus the first link that I provided should get you started with adding date information to your documents. You can have multiple fields with the same name. This will then add the date to all of these in one operation.
-------------------------- ---------- ---------- ---------- -----
Here is the link khkremer made reference to, though I cannot make heads or tails of it.
https://www.experts-exchange.com/questions/21003596/Acrobat-custom-calculation-javascript-date-difference.html
Your help on this is greatly apprieciated!
coma12
I have a text field in an acrobat 6 file called "today" and I want it to show 2 weeks ahead of the current date in MM/DD/YYYY format. Below is a solution given to me by khkremer. Can anyone add to this answer or give me another solution?
--------------------------
select the Form tool: "Tools>Advanced Editing>Forms>Text Field Tool" and draw a rectangle on your PDF document. This will bring up the preference dialog for this form field. Select the "General" Tab and specify "Today" as the field name. Look around on the UI, select all the tabs, but you don't need to make any more changes here. Close the dialog. Select "Advanced>JavaScript>Docum
this.getField("Today").val
Save the file, close it and reopen it. YOu will now have the string "today's date" in your field. This information plus the first link that I provided should get you started with adding date information to your documents. You can have multiple fields with the same name. This will then add the date to all of these in one operation.
--------------------------
Here is the link khkremer made reference to, though I cannot make heads or tails of it.
https://www.experts-exchange.com/questions/21003596/Acrobat-custom-calculation-javascript-date-difference.html
Your help on this is greatly apprieciated!
coma12
Were you able to add the text field to the document as I suggested in your earlier question?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
khkremer,
Thank you so much!!!
I was hoping you were scanning the acrobat section.
Once again you came through like a champ and saved the day!
coma12
Thank you so much!!!
I was hoping you were scanning the acrobat section.
Once again you came through like a champ and saved the day!
coma12
ASKER
http://www.reedh.com/newsletter/NewsletterOrderForm050427.pdf
Also if I will need to make the date in red.
thanks,
coma12