Expand my Community achievements bar.

Http sumbit questions

Avatar

Level 6
Hi,



I´m using an http submit button inside my pdf. How can I get the name of each field at the server side? (I´m using asp) I ask this because I´m able to get the data but not the name of the field related to that data.



Seconde question: is it possible, after a submit, not to process the new page (the response), and stay with the original form? (it´s a kind of an execute... but for that one needs readers extensions...).



Thank you
8 Replies

Avatar

Former Community Member
I'm trying to do a simple http submit and send the data that the user entered into the form to a ColdFusion (cfm)page and soon to be an ASP page but I can't figure it out. I can do the link and I go to the cfm page but I can't seem to figure out how to access the data from the pdf form. I transfer data from one html page (cfm page) to another without any issues. I have nothing extra installed on the server (i.e. reader exensions).



You said you get the data but not the field name, how do you see the data in your asp page? What is the name of the field or the syntac because if I assume it is the pdf field name in the pdf form then I can't see it.



I can Email the data with no problems just can't get the data "transfered" to a HTML page.

Avatar

Former Community Member
If you put an HTTP Submit button on a form, when you press the button, the fields on the form are sent using the standard form encoding...



From ASP.NET you can access the field using the Request object:



protected void Page_Load(object sender, EventArgs e)

{

Response.Write("Field TextField1 Value is " + Request["TextField1"]);

Response.End();

}



I'm not familiar enough with ColdFusion to say what the equivalent is, but it should be no different than handling any other form..

--

Steve Tibbett

Adobe Systems

Avatar

Former Community Member
As far as getting the names of the fields, you should really know that in advance (know what fields you're expecting to be submitted).. but if you don't, you could iterate through the Request.Form collection:



protected void Page_Load(object sender, EventArgs e)

{

foreach (string key in Request.Form.AllKeys)

{

Response.Write(string.Format("{0}: {1}

", key, Request.Form[key]));

}



Response.End();

}



That should print the name of each field submitted, and it's value.



(That's ASP.NET / C# code; I know you can do the same in VB / classic ASP but I don't know the syntax offhand).

--

Steve Tibbett

Adobe Systems

Avatar

Former Community Member
Hi,



I am new to Adobe Form coding. Could anyone help me on the issue: How to set up the URL value of HTTP submit button in the LiveCycle Design? I give value of "http://localhost/my_prj/my_page.aspx" and when Preview PDF, have error "Invalid enumerated value:urlencoded"



Thanks,

rob

Avatar

Former Community Member
Response.Write(Request.QueryString)



Does not work, anyone found a solution?

Avatar

Former Community Member
Well,
Request.QueryString might not work because Acrobat forms are submitted using POST, not GET. The querystring object is available with forms being submitted via GET only.



Regards,

Steve

Avatar

Former Community Member
How do you use the Adobe PDF Form as a simple HTTP Posted form ?

I am having trouble getting the field values...

Using an HTTP Submit button..., with a http://localhost/test.asp URL



Response.write(request.Form("Field1")).... Not working with standard asp.... What am I missing here?



Any help ?

Avatar

Former Community Member
Unlike HTML PDF is hierarchical and can support multiple fields with the same name in the same form. So Field1 is not a sufficient name as it could be present an infinite number of times in the PDF form, the actual name will be the full SOM expression to the field in the PDF. So something like: Form[0].SubForm[0].Field1[0]



Chris

Adobe Enteprise Developer Support