Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

HTTP Submit Button Behavior

Avatar

Former Community Member
Hello all. I've just used Adobe LiveCycle Designer for the first time. I had a simple PDF file that I wanted to be filled out electronically so that users online could download it and fill it out and then either print it and send it to me via mail, or submit online electronically.



I've gotten the form all setup and the Print button works fine. But I don't quite understand the HTTP Submit Button. I believe that when a user presses it after filling in the information, it just sends a POST command with the filled data? If this is true, then why is it expecting a return response?



Basically, I just want to send the data via a POST or an XML file to an .aspx website I have. All I want the site to do is read the data and possibly send the user to a "data received successfully" page. But I just can't seem to get any of it working no matter what I try. Adobe Reader always gives the error of "An error occurred during the submit process. Cannot process content of type text/html; charset=utf-8". I think I have my .aspx page code set correctly but I just don't know the full behavior of what Adobe is expecting after sending that data.



Can anyone help please? It just seems like it's so difficult to do something so basic. Too bad my original intentions of attaching the PDF to an email don't work (with Adobe Reader anyway) without some kind of server extensions.



Thanks!
5 Replies

Avatar

Level 7
> If this is true, then why is it expecting a return response?



That's the normal thing, or so it seems to me. When an HTML form posts

a form, the browser awaits a response. The response is shown in the

browser window.



You need to return a content-type understood by the browsing client

(i.e. Adobe Reader), which does not include HTML.



Aandi Inston

Avatar

Former Community Member
OK, so does that mean I need to somehow send back from my .aspx page a standard http 200 response? Or is it expecting some other kind of data? What are my options (like can I send back a custom message or something)? Thanks for your help!

Avatar

Level 7
Yes, it needs a content-type it understands (such as application/pdf)

and some valid data matching that content type. "Empty" is not a valid

PDF.



You could create a tiny "thanks" PDF and serve that.



Aandi Inston

Avatar

Level 6
You can return an HTTP 204 response, indicating there is no content, but this doesn't provide any feedback.



What I do with Acrobat forms is return an FDF, which causes a success (or failure) pop-up message to display. Not sure how you'd do something similar with a Designer-created form, but it's probably possible.



George

Avatar

Former Community Member
Thank you for you replies, that makes sense now. What I ended up doing is just using a Submit button, making it submit as a PDF, put the Submit to URL as a mailto address and then once the form PDF was saved within Designer, I edited it with Acrobat and made sure Adobe Reader had rights to be able to save filled forms. Thus now when I or anyone opens the fillable PDF form with Adobe Reader, they can save it or once they click on the submit button, it pops up their default email client compose mail screen with the filled PDF attached and whatnot. This seems easiest to me and works well enough.



I'll definitely keep a record of you responses in case I need to change this later though. :) Thanks!