Expand my Community achievements bar.

Two Questions from a New User: Printing and Page Number

Avatar

Former Community Member
Is there a way using either formcalc or javascript to modify the existing "print form" so that it will automatically print two copies?



and,



Is there a way to generate a unique number. I was trying to think up a way to use the date/time field without the formating. For example, 7320071402 would work very well. I need the completed form to have a unique number assigned to it and the date/time field seemed like a place to start.



I appreciate your inputs.



Regards,



Stan
2 Replies

Avatar

Level 7
To print 2 copies you need to access the script for the "Print" button object and duplicate the line of code just below the present line of code.



For the second item, you can use the systems JavaScript date and time object to get a unique number down to the millisecond.



var oDateTime = new Date(); // get the date/time object

$.rawValue = oDateTime.valueOf(); // set field value equal to the value of the date/time object.