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

getting javascript counter to count only on main doc

Guest
Oct 12, 2016 Oct 12, 2016

//<Document-Actions>

//<ACRO_source>Document Will Open</ACRO_source>

//<ACRO_script>

/*********** belongs to: Document-Actions:Document Will Open ***********/

var f = this.getField("counter");

f.value = Number(f.value)+1;

f.defaultValue = f.value;

//</ACRO_script>

//</Document-Actions>

I have a form template that i fill out and save as customers name. Each customer needs a number each time I open rental contract.pdf with adobe DC a new number is assigned to them.

the problem

atm I have it as soon as the template doc is opened it moves up a number but u have to save it immediately then u fill it out then save as customer 1. You can then close it reopen it with DC and the number has changed. but what happens if the agent forgets to save as soon as the doc is opened the number does not move up. I need a more effective code or an alternative.

can anyone provide an alternative method or better code?

TOPICS
Acrobat SDK and JavaScript
147
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
no replies

Have something to add?

Join the conversation