[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 949
  • Last Modified:

Adobe Form PDF Incremental Counter

We created a form using Acrobat Pro that our users will fill fields and check boxes. That form is then sent by email using the Submit button on the form. What we would need is to have a number associeted to that form, every form created would have a different case number that is incremented. Is it possible to make that happen?
0
Foliot
Asked:
Foliot
  • 7
  • 5
1 Solution
 
Karl Heinz KremerCommented:
Don't submit the forms via email. This is not reliable. Not everybody has an email client software installed (e.g. when using a web mailer). Not all web mailers can act as MAPI clients.
The only reliable way to submit your form is via an HTML submission (to a forms processing script on the server). When you do that, that script can assign the number at submission time, and the script can then communicate that number back to the client (e.g. by creating a merged PDF with all the form fields flattened, and the new number applied).
0
 
FoliotAuthor Commented:
The form will be used internally in the company and our users use Outlook so that's not a problem. what you're saying is beside a HTML form with a server there is no way to get that done?
0
 
Karl Heinz KremerCommented:
Do all your users have the full Adobe Acrobat, or are they using the free Reader?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
FoliotAuthor Commented:
They are using the free reader.
0
 
FoliotAuthor Commented:
Do you need any more information on this or is the request not clear?
0
 
Karl Heinz KremerCommented:
Unfortunately you need the full Adobe Acrobat to access information in e.g. an ODBC data source, or to access data via SOAP. The free Reader does not allow that.
0
 
FoliotAuthor Commented:
Ok, and would it be possible to have a the PDF name generated differently and then have the numbers in the file name used into the PDF file?
0
 
FoliotAuthor Commented:
I found this link
http://www.adobeforums.com/webx/.3bbedaa6.59b6e691 
Any idea how we could setup something similiar? Have our web server generate a different file, and if the form is submitted that number may not be used anymore? This way we could start our counter at 100000 and until someone hits the submit button it would stay at 100000 and then it would go up by one when submitted. That part of the name would be sent in the form in a specific case.
0
 
Karl Heinz KremerCommented:
Yes, that is possible. You can give it a try here: http://khk.net/EEstuff/test_number.pdf?1212123

However, it's probably not a good idea to increment the counter only after a form gets submitted: If two users download the form at about the same time (without any submits in between the two downloads), they would get the same form number. User one then submits the form, the counter gets incremented, and then user two sumbits the form, but uses the same number as user 1. You need to increment the counter when a form gets downloaded. You may end up with form number that don't get used because somebody decides to just close the document without submitting it.

I added a form field named theFormNumber to the document. Then I added a document level JavaScript that would parse the URL:
var formNumber = "0";
var theURL = this.URL;
pos = theURL.lastIndexOf("?"); 
if (pos < 0)
{
    // we don't have a form number, use "0"
    formNumber = "0";
}
else
{
    formNumber = theURL.substring(pos+1);
    if (formNumber.length == 0)
    {
       formNumber = "0";
    }
}
 
this.getField("theFormNumber").value = formNumber;

Open in new window

0
 
FoliotAuthor Commented:
Great that will be helpfull, do you have any idea how to increment the numbers of the file when it gets downloaded? I'm quite a dummy when it comes to scripts.
0
 
FoliotAuthor Commented:
Thank you for the help, we have a programmer that did the job on generating the name.
0
 
Karl Heinz KremerCommented:
Good.  To solve that problem, I would have needed much more information about your setup.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now