0 Replies Latest reply on Oct 12, 2016 6:49 AM by bumpn

    getting javascript counter to count only on main doc

    bumpn

      //<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?