Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Document JavaScripts Question
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Document JavaScripts Question

 Post Reply Post Reply
Author
ErinSpre View Drop Down
New Member
New Member
Avatar

Joined: 23 Aug 2016
Location: 54650
Points: 2
Post Options Post Options   Quote ErinSpre Quote  Post ReplyReply Direct Link To This Post Topic: Document JavaScripts Question
    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.

Thanks!
Erin
Back to Top
Sponsored Links


Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 615
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post 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 try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
ErinSpre View Drop Down
New Member
New Member
Avatar

Joined: 23 Aug 2016
Location: 54650
Points: 2
Post Options Post Options   Quote ErinSpre Quote  Post ReplyReply Direct Link To This Post Posted: 24 Aug 2016 at 3:14pm
Thanks for your help!
Erin
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

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

This page was generated in 0.029 seconds.