3 Replies Latest reply on May 4, 2009 3:05 AM by Bernd Alheit

    submitForm & cSubmitAs: "HTML"- how to post pdf form fields?

    SuyogKale

      when adding submit button in pdf and setting the parameters for submit form window,  I am able to sucessfully post the pdf to my server:

       

       

      but when I write a javascript and call the submitForm its not working, here is the scenario:

       

      i have added form having some check boxes,

      if user fills all required fields,i have written the javascript to submit the form , but it not working.

      here is javascript code sample:

       

       

      var docs = app.activeDocs;

      var content = new Array();
      for (var docCount=0; docCount < docs.length; docCount ++)
      {
                for(var i = 0; i < docs[docCount].numFields; i++)

                {
                  var name = docs[docCount].getNthFieldName(i);
                  var field = docs[docCount].getField(name);
                  content[i] = new Object();
                  content[i].name = field.name;
                  content[i].val = field.value;
                }
             
      }

       

      this.submitForm({
      cURL: "http://myserver/#FDF",
      aFields:content,
      cSubmitAs: "HTML" // the default, not needed here
      });

       

       

      and on server i am reading the all field like:

       

       

      what is wrong request is going to server but i am not able to read field key- value pair on server.

       

      let me know how to pass selected fields key-value to server , i want to submit form as HTML only

       

      for(index = 0 ;index< Request.Form.Count - 1;index++)
      {

                      controlPara = Request.Form.AllKeys(index);

                      controlValue = System.Web.HttpUtility.UrlEncode(Request.Form(index));

       

                    If (controlValue.Length > 0)

                    {

                                paraNames &= controlPara & "||-||"
                               paraValues &= controlValue & "||-||"
                    }         
      }

       

      waiting for response..........