Go Back   Serif Software Forums > Design and Publishing > PagePlus

Notices

PagePlus Questions about using PagePlus for desktop publishing

 
 
Thread Tools Display Modes
Old 28th April 2008, 06:10 PM   #1
Steve W
Message imported from old Serif Forum
 
Posts: n/a
Lightbulb Auto-fill DATE in PDF form at time of filling out

I tried to search on this from past threads and found unanswered question so I'll ask it again:

Is there a way for a DATE field to be auto-populated at the time a person fills out a PDF form? I know I can populate a text field with the DATE when making a document, but can't find any info about this for PDF forms.

Steve W
 
Old 29th April 2008, 02:29 PM   #2
'Awful Punster'
Message imported from old Serif Forum
 
Posts: n/a
Lightbulb Re: Auto-fill DATE in PDF form at time of filling

Hi Steve,

You can display today's date via the Form Field Properties dialog for the date field. Go to the Actions tab, click 'Add', choose 'On Blur' from the Event dropdown (which will cause the script to run when the page is loaded, because the field won't have focus) and choose 'Run custom JavaScript' from the Action dropdown. Give the script a name (e.g. showDate) and enter the following in the Script box:

  this.getField("todaysDate").value = util.printd("mmmm dd, yyyy", new Date());

The above script assumes that the form field is named "todaysDate" (on the General tab of the same dialog) and that you want the date in the form "April 29, 2008". You can change the name and/or the date format to suit.

Whether the date the person opens the form is actually the same as the date when they fill it out will obviously depend on how the form is being used, but I hope this helps with what you're trying to achieve.

Alfred

Click here to visit my Serif-related pages http://serif.awfulpunster.info/' sty...et='_blank
 
Old 29th April 2008, 09:53 PM   #3
Steve W
Message imported from old Serif Forum
 
Posts: n/a
Lightbulb Re: Auto-fill DATE in PDF form at time of filling

Thanks! That was exactly what I was looking for. I knew that it would probably end up being some java code to do the trick, but since I'm not well-versed in java I was hoping someone could come up with the trick. I've been a programmer / development manager all of my career, but java was not something I ever had to fool with. However, with my background it was easy to see what the small piece of code was doing.

Steve W
 
Old 29th April 2008, 10:58 PM   #4
'Awful Punster'
Message imported from old Serif Forum
 
Posts: n/a
Lightbulb Re: Auto-fill DATE in PDF form at time of filling

 
Alfred
 
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:50 PM.