Javascript | How to post Acord PDF Forms data to a Web URL

Description : You have Fillable PDF on which you have button “Save Entered Data”. On button you want post the form data to php file.

Solution :

Follow these steps :

1. Open Form with Adobe Acrobat Pro. Goto–>Tools.

2. From Tools, Go to Tools–>Rich Media.

3. Click on Select Object button on top. Next right click on button “Save Entered Data” on Form and go to Properties.

4. From Properties goto Actions Tab and select “Run a Javascript” as action on button. Next Click “Add” button on the screen. On “Add” button Javascript code editor is opened then put your code in editor and click on save button.

Javascript Code Example :

(function() {
var objectId = this.getField("objectId").value.toString();// To Get Forms Fields value.
var formNumber = this.getField("formNumber").value.toString();
var object2 = this.getField("object2").value.toString();
var quoteId = this.getField("quoteId").value.toString();
var objType = this.getField("objType").value.toString();
var orgId = this.getField("orgId").value.toString();
var formName = this.getField("formName").value.toString();
var webURI = "YourUrl/pdfchanged.php?objectId=" + objectId + "&formNumber=" + formNumber + "&object2=" + object2 + ""eId=" + quoteId + "&objType=" + objType + "&orgId=" + orgId + "&formName=" + formName + "&PW=" + pw;
this.submitForm({cURL: encodeURI(webURI), cSubmitAs:"PDF", cCharSet:"utf-8"})})()

Note : Adobe Acrobat Pro is required to be installed on your system to open PDF in editable mode.

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Web development or any other software development assistance please contact us at webdevelopment@webners.com

Leave a Reply

Your email address will not be published. Required fields are marked *