PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________


Le lundi, 1 d�c 2003, � 01:16 Europe/Paris, [EMAIL PROTECTED] a �crit :


Hi All

New to list so could be a silly question.

I am setting up a FORM for our company to log in jobs. I was going to add a javascript to insert the current date in a field when the form is first loaded. However I just thought if a user reloads the form once saved to check the job would the date he loads it in overwrite the original date?

How can I solve this?

Also on the same subject I was going to use the yymmddhhmmss to give each a unique JOB NUMBER but again if another user loads the PDF will this not change again?

Cheers
Paul



Try something like that :

if (this.getField("JOB NUMBER").value == "")
    {GenerateSerialNumber();
    }

if (this.getField("DATE").value == "")
{this.getField("DATE").value = util.printd("dd/mm/yyyy", new Date());
}



This require "JOB NUMBER" and "DATE" fields to be empty when the form is saved.




Here is a sample which use this script in page open action, GenerateSerialNumber is a doc level script.

http://abracadabrapdf.net/pagespdf/BonCommande.pdf

password to unlock this file is "helenripley"


--
JRB
www.abracadabraPDF.net


To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html



Reply via email to