20 Replies Latest reply on Jan 5, 2016 1:29 AM by Saida Rao Gampala

    Form Won't Submit Outside Browser




      I have a form that uses the submitForm() JavaScript function to submit the form to a handler. The handler adds the completed form to a SharePoint document library.


      The form submits successfully when it is opened in a browser with the Adobe Reader plugin. But when viewed outside of the browser (in Acrobat), an error occurs with the message "An error occurred during the submit process. Unknown failure." (see first image).


      If I change the cSubmitAs parameter to something other than "PDF" (such as "XML"), then the form submits successfully. Why does the "PDF" parameter cause the submit to fail? The form needs to be submitted as a PDF to preserve layout and document signatures.


      Here is the Submit button JavaScript:


      var aSubmitFields = new Array( "name", "id", "juser" );


        cURL: "https://my_website.com/_layouts/ASHXHandlerDemo/ashxhandler.ashx",

      cSubmitAs: "PDF"