Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Date Field, Display when form is being printed

Community Beginner ,
Sep 24, 2019 Sep 24, 2019

Hello,

I have a work form where a field for the Date will display when the form is sent to the printer.

I wanted this same Date field so I copied the field and pasted into my new form, but it doens't print.

Looking, it wasn't done with any javascript. I am not sure how it grabs the date when being printed.

I appreciate any insight into how this might work.

 

Thanks,

1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 24, 2019 Sep 24, 2019

Hi,

 

Look under Document Actions in the old file and you should see a script entered under Will Print. You will need to add that to your new file too.  You can also set the date field to Print only in your new form if you want it to only show when printed.

 

Hope this helps,

 

Dimitri

www.pdfscripting.com

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 25, 2019 Sep 25, 2019
Thank you DimitriM, how do I navigate to Document Actions/Will Print? I looked in the Actions Wizard but didn't see anything. thank you.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 25, 2019 Sep 25, 2019
Scratch that, I found it 🙂 For those who might come across this: Prepare Form/More/Document Actions/Document Will Print.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 25, 2019 Sep 25, 2019

Also here is the script I found

var f = this.getField("Date");
 f.value = util.printd("mm/dd/yyyy", new Date());

var f = this.getField("Time");
 f.value = util.printd("h:MM tt", new Date());

var f = this.getField("FormID");
 f.value = new Date().getTime() ;
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 25, 2019 Sep 25, 2019
LATEST
There is a difference between "Document Actions" and Actions in the Actions Wizard, confusing so sorry about that. You can find the Document Actions under the JavaScript menu.. If you open that you will see a dialog with the "Document Will Print" option. If you select that and click edit then you can see any scripts that were entered there..
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines