I've made a pdf form in Adobe Acrobat. Now I want to make a button that submits the form to a HTTP POST request. I have searched for about 4 hours, but I have not found an example to do this.
Here I read that it is possible to send the pdf form fields with a HTTP submission, but there's also no example given:
I'm looking for a JavaScript example that I can link to the submit button.
I've made a pdf form in Adobe Acrobat. Now I want to make a button that submits the form to a HTTP POST request. I have searched for about 4 hours, but I have not found an example to do this.
Here I read that it is possible to send the pdf form fields with a HTTP submission, but there's also no example given: http://acrobatusers./tutorials/form-submit-e-mail-demystified
I'm looking for a JavaScript example that I can link to the submit button.
Share Improve this question edited Dec 3, 2010 at 14:48 Josjojo asked Dec 3, 2010 at 14:39 JosjojoJosjojo 3141 gold badge2 silver badges11 bronze badges 2- Are you trying to just submit the name/value pair for each field or the entire PDF? The examples I've seen submit the entire PDF file back to the server. – madisonw Commented Dec 3, 2010 at 14:45
- 1 Yes, only the name/value pair. It is unnecessary to submit the rest of the information. – Josjojo Commented Dec 3, 2010 at 14:51
1 Answer
Reset to default 11doc.submitForm(url, false);
or
doc.submitForm( url, null, null, null, null, null, null, null, null, null
null, null, null, null, null, "HTML" );
submitForm
actually takes 23 different parameters, the above is only using 16 of them. And if I miscounted, I'm trying to use the cSubmitAs parameter.
This from the JavaScript API reference, which can be found at... lets see... right here. Enjoy.
PS: "this" is almost universally the document in acrobat events. event.target might be a field or something, but "this" is going to be the document.
PPS: Things like bEmpty
, aFields
, and various other parameters don't work when bFDF = false
.