Print Page | Close Window

Document JavaScripts Question

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
Printed Date: 21 Nov 2019 at 8:47am
Software Version: Web Wiz Forums 11.10 -

Topic: Document JavaScripts Question
Posted By: ErinSpre
Subject: Document JavaScripts Question
Date Posted: 23 Aug 2016 at 5:32pm
I am a newbie when it comes to working with JavaScript in PDFs. Also, I aplogize if I have placed this question in the wrong category!

I have added the following code to the Document JavaScripts:

this.getField("Invoice number").value = util.printd("mmddyyyy", new Date()) + "_" + this.getField("Owner Name").valueAsString;

How can I get the information from the Owner Name field to show in the Invoice number field right after it is entered into the form? Right now it only shows after the PDF is saved and re-opened.



Posted By: try67
Date Posted: 24 Aug 2016 at 1:14pm
Place it also as the custom calculation script of "Invoice number", with this code:

event.value = util.printd("mmddyyyy", new Date()) + "_" + this.getField("Owner Name").valueAsString;

- Acrobat Expert - Contact me personally at
Check out my custom-made scripts website:

Posted By: ErinSpre
Date Posted: 24 Aug 2016 at 3:14pm
Thanks for your help!


Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -