Problems processing Acrobat forms with PHP

It's a real simple script. All we do is have users fill out a
form with information and it's sent to a php file on the server,
which then sends an e-mail to the admin with the user's input then
sends a thank you e-mail to the user. I used regular web forms
using the post method with input tags. The php code recognized the
values of regular htm forms, but we are converting all of our forms
to PDF.
I am having problems with Acrobat form submission. I tried
sending the data using the http submit/post, but I cannot figure
out how to stop it from displaying the user input inline (ie.
name=nameaddress=addresscity=citystate=state). Our clients cannot
receive e-mails with everything inline like that. I cannot send it
using mailto: or by the default e-mail either because the clients
cannot receive attachments.
I heard that sending the form via xml and parsing it would
work, but when I use the parser it needs the exact .xml file name
and every time someone submits a form the file name changes.
Does anyone know how to use the http submit method in acrobat
and stop the text from displaying inline, how to parse the xml, or
of any other ways that will make the text display correctly?

Please post to the correct forums. At least 2 other
duplicates of this post are also in the Connect forums, which are
wholly unrelated to PDF topics.

Similar Messages

  • Acrobat form with server side submit, posting blank data

    Read more
    Acrobat form with server side submit, posting blank data,
    thanh xả tràn
    I have a PDF form which gets submitted to the server using a submit (server-side) button. The data is then received in XML format by a ColdFusion component which does some validation and stores it into the database.
    This PDF form is usually filled in by our clients using Adobe Reader 8 or below. While most of the times(and I mean like 96-97% of the times) everything goes well, at times we receive blank data into our database!! This renders couple of other features in our application useless as they try to parse an XML which does not exist.
    I do believe that this is not a problem at the ColdFusion side because all it does is trim(ToString(toBinary(GetHttpRequestData().content))).
    Does anyone has a clue as to why the data will be lost upon form submission?? I have done a lot of googling around it but in vain!

    There is an outside chance someone is just playing with you and submitting a blank form. Not uncommon if someone is not too familiar with forms.

  • Create HTML Contact Form with PHP script

    Hi Everyone
    I have designed a contact form in HTML with PHP script but it doesn't seem to be working. The PHP echo message doesn't appear after I submit the form and the e-mail message is not delivered.  The url address is http://www.dreamaustraliastudytours.com.au/Test/ContactUs.html. Any thoughts would be greatly apprecipated
    Thank you in advance
    Paul

    Hi Ben and Murray
    Thank you for your input on the php script. You nailed the problem on the head. I have up dated the script  and provided it below. I have one more question.
    After the end user submits the form I would like them to be directed to another html file - for example successful.html. Would the code be
    $insertGoTo = "successful.html";
    delete 'Thank you for contacting us. We will be in touch with you very soon.'?
    Once again thank you for your advice
    Regards
    Paul
    <?php
    if(isset($_POST['email'])) {
        $email_to = "[email protected]";
        $email_subject = "New Inquiry";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['first_name']) ||
            !isset($_POST['last_name']) ||
            !isset($_POST['email']) ||
            !isset($_POST['telephone']) ||
            !isset($_POST['comments'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');      
        $first_name = $_POST['first_name']; // required
        $last_name = $_POST['last_name']; // required
        $email_from = $_POST['email']; // required
        $telephone = $_POST['telephone']; // not required
        $comments = $_POST['comments']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$first_name)) {
        $error_message .= 'The First Name you entered does not appear to be valid.<br />';
      if(!preg_match($string_exp,$last_name)) {
        $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
      if(strlen($comments) < 2) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "First Name: ".clean_string($first_name)."\n";
        $email_message .= "Last Name: ".clean_string($last_name)."\n";
        $email_message .= "Email: ".clean_string($email_from)."\n";
        $email_message .= "Telephone: ".clean_string($telephone)."\n";
        $email_message .= "Comments: ".clean_string($comments)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers); 
    ?>
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>

  • Acrobat form with submit button

    Have a coldfusion app that includes an acrobat form that contains a submit button.  The button submits the form to another CF page.  I'm making some fixes to this app and need to change where the form submits, currently it's going to production but i need it to go to test.  When I open the form in Acrobat 8 or Livecycle I don't see any script.  Anyone know where to change wheer this form posts?

    Not sure about LiveCycle, but here's how to do it in acrobat.
    1) Right click on Form Button -> Properties -> Actions
    You should see a list of actions associated with the button.  something like:
    - Mouse Up
           Submit a Form
    2) Select on "Submit a Form" and click "Edit" at the bottom of the screen
    3) Edit URL in "Submit Form Selections" window.

  • Problem displaying my form with Form9i

    Yep I got another problem with Form9i :/
    The problem is when I try to execute my form, It doesn`t load my form but a form with an Oracle background...anyway nothaing related with the form that I expect to look at.
    PS: I start Oc4j instance before I load my form and Im on winXP and I use Explorer5.
    thx

    the url is:
    http://sim:8888/forms90/f90servlet?form=C:\Documents%20and%20Settings\Simon\Desktop\oraclefile\AJOUTER_FILM.fmx&userid=SIMON/SSURFERS@labase&buffer_records=NO&debug_messages=NO&array=YES&query_only=NO&quiet=NO&RENDER=YES
    and when I click on run the error that appear is frm:909210 wrong paramater after the key on the command line.

  • Email form with php

    Hello,
    I have been reading that mailto: is outdated.  I have been reading on creating an email form using php.  I don't  understand.  Do you create a table first to put the info:
    First Name:
    Last Name:
    Email:
    Message:
    Submit button
    Does anyone know of a comprehensive article that I could read with maybe some examples or even tutorial.   This is my webstie www.ewrolexrepair.com.  This is my first website.  I am trying to put somekind of email contact next to my picture.  Any help would be greatly appreciated.  Thanks!

    Below is a ready made php form including First Name, Last Name, Email and Message.
    The form is sent back to the page it is located on i.e. if the form is inserted into a page called 'contact.php' then the action form field would be as follows: <form id="enquiryForm" name="enquiryForm" method="post" action="contact.php">
    Change the below in the code to your email address (the one you want the info to be sent to):
    $to = "[email protected]"; //email address -- change to your own email address
    Change success.php below in the code to the page you want the user to go to after submitting the form.
    header("Location: success.php");
    //Redirect page -- change to your own page
    <!-- FORM CODE STARTS HERE -->
    <?php session_start(); ?>
    <?php
    if (array_key_exists('submit', $_POST)) {
        // check first_name field
    $first_name = trim($_POST['first_name']);
    if (empty($first_name)) {
        $error['first_name'] = 'Please provide your first name';
    elseif ($first_name == 'Please provide your first name') {
        $error['first_name'] = '';
    $_SESSION['first_name'] = $_POST['first_name'];
    // check last_name field
    $last_name = trim($_POST['last_name']);
    if (empty($last_name)) {
        $error['last_name'] = 'Please provide your last name';
    elseif ($last_name == 'Please provide your last name') {
        $error['last_name'] = '';
    $_SESSION['last_name'] = $_POST['last_name'];
    // check email field
    $email = trim($_POST['email']);
    if (empty($email)) {
        $error['email'] = 'Please enter your email address';
    elseif ($email == 'Please enter your email address') {
        $error['email'] = '';
    $_SESSION['email'] = $_POST['email'];
    // check enquiry field
    $message = trim($_POST['message']);
    if (empty($message)) {
        $error['message'] = 'Please enter your message details';
    elseif ($message == 'Please enter your message details') {
        $error['message'] = '';
    $_SESSION['message'] = $_POST['message'];
    if (!empty($_POST['ufo'])) { return false; }
    // recipient
    $to = "[email protected]"; //email address -- change to your own email address
    // email subject
    $subject = "Enquiry from Website";
    // sender
    $sender = "From: ".$_POST['email']."\r\n";
    // build message
    $enquiry = "First Name: $first_name\n\n";
    $enquiry .= "Last Name: $last_name\n\n";
    $enquiry .= "Email Address: $email\n\n";
    $enquiry .= "Message: $message\n\n";
    // send email if no form erorrs
    if (!isset($error)) {
    mail($to, $subject, $enquiry, $sender);
    header("Location: success.php");        //Redirect page -- change to your own page
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>PHP Form Test</title>
    <style type="text/css">
    /* style the form input fields */
    #enquiryForm input {
        font-family: arial, verdana, sans-serif;
        font-size: 12px;
        width: 300px;
        padding: 5px;
    /* style the form textarea field */
    #enquiryForm textarea {
        font-family: arial, verdana, sans-serif;
        font-size: 12px;
        width: 300px;
        padding: 5px;
    /* style the form submit button */
    #enquiryForm #submitButton {
        width: 100px;
    </style>
    </head>
    <body>
    <form id="enquiryForm" name="enquiryForm" method="post" action="contact.php">
    <h2>Online Enquiry</h2>
    <p>Required Information*</p>
    <p><label for="Name">First Name* </label><br />
    <input type="text" name="first_name" id="first_name" <?php if(isset($error['first_name'])) echo "style='border: 1px solid #C00; color: #C00;'"; ?> value="<?php if(isset($first_name)) {echo $first_name;} ?><?php if(isset($error['first_name'])) echo $error['first_name']; ?>" onfocus="this.value=''"></p>
      <p><label for="Name">Last Name* </label><br />
      <input type="text" name="last_name" id="last_name" <?php if(isset($error['last_name'])) echo "style='border: 1px solid #C00; color: #C00;'"; ?> value="<?php if(isset($last_name)) {echo $last_name;} ?><?php if(isset($error['last_name'])) echo $error['last_name']; ?>" onfocus="this.value=''"></p>
      <p><label for="email">Email<span>*</span>
    </label><br />
      <input type="text" name="email" id="email" <?php if(isset($error['email'])) echo "style='border: 1px solid #C00; color: #C00;'"; ?> value="<?php if(isset($email)) {echo $email;} ?><?php if(isset($error['email'])) echo $error['email']; ?>" onfocus="this.value=''"></p>
      <p style="padding-bottom: 0;"><label for="enquiry">Message<span>*</span></label><br />
      <textarea name="message" id="message" <?php if(isset($error['message'])) echo "style='border: 1px solid #C00; color: #C00;'"; ?> onfocus="this.value=''"><?php if(isset($message)) {echo $message;} ?><?php if(isset($error['message'])) echo $error['message']; ?></textarea></p>
    <p><input type="text" name="ufo" style="display: none;"></p>
    <p><input type="submit" id="submitButton" name="submit" value="Send Enquiry" /></p>
      </form>
    </body>
    </html>

  • Acrobat Forms with Echosign

    Hello,
    I am trying to finish a simple form for my company. This form has a few check boxes that I need to be required before submitted through echosign. Although the required field is checked and the boxes appear red when highlited, Echosign still allows me to send the form with the boxes unchecked. Has anyone else acquired experience with Echosign and Adobe before that could lend some advice? Thanks
    Joe P

    Joe P - Attached is the EchoSign forms tutorial which may help.  Essentially I think you want to be able to "prefill" the checkbox selection before it goes out for e-signature.  If this doesn't help, please also shoot a copy of the form to echosign customer support (support at echosign.com)

  • Acrobat Forms with Javascript

    I have a form that I would like to have required fields before saving or print. I am really new to javascript coding and know nothing about syntax. I do have some experience with basic html, but this form will not be used online. It will get emailed, filled out, and returned.
    Is there a way to prevent a user from skipping over a required field and is there a way to prevent saving/printing until all fields are completed?
    Thanks in advance.

    You can't prevent someone from saving or printing a file. But you can use a
    script to make sure (well, almost sure...) that if they try to do that when
    the file is not correctly filled, the result will be a blank file. For that
    you can use this script, created by me:
    http://try67.blogspot.com/2011/12/acrobat-validate-fields-before-printing.html
    It's also possible to prevent someone from leaving a field unless they've
    entered some data into it (again, using a script), but that's usually not a
    good idea, as it would prevent them from tabbing through the document and
    could be very annoying.

  • Problem using Acrobat Pro with Chrome 41.0.2272.118

    This works in IE and Firefox but not in Chrome; When I double click on an attachment on my dashbord, only while in Chrome, It tries to open in it's own pdf viewer or Acrobat Reader depending on what plug-in is enabled..  I want to open pdf's in Acrobat X Pro. I have Edit-Prefs-"Display PDF in Browser" selected and the pointer set to Acrobat XPro. I tried disabling both Chrome pdf viewer and the Acrobat Reader Plug-Ins and now it sends me to save the attachment.  This adds many steps to what is a single Point & Click in FF or IE.  I need the full functionallity of A-X Pro.  I have to do this many times in a day.  Saving to my internal drive and reopening from there will waste a lot of time in a day.

    Hi,
    1. To change the scan mode to ADF, you can change it on MAC under the Scan-Modus dropdown in ICA Window (Second window in snapshot)
    2. I think you are able to scan both sides automatically using Samsung SCX scanner as the scanner is a duplex scanner. Currently Acrobat automatically scans only front side for simplex scanner and scans both sides for duplex scanner and the option for scan sides is disabled for ICA
    In case your scanner stops scanning in flatbed mode, please try to scan with the system scanner to see if it is not due to scanning at a very high DPI
    I think this solves your problems.

  • Problem processing RAW images with Lion and 3.1.3

    Images that have "This photo was adjusted using an earlier version of Apple's RAW processing.  Attempting to send to a plug-in or Photoshop results in a dialog "Editing Error This image cannot be rendered for editing because Aperture does not support the image format."  Images that were previously processed with the current version of RAW processing work correctly.

    There is another discussion for problem with raw and the new 10.7.3.1 : my Raw from Panasonic GH2 are green and Aperture says : treatment with old version
    I find the solution to correct my RAW : they are green because of the bad WB applied by Aperture.
    I put here the solution but I have to correct manually and ask to treatment in the RAW windows for each picture. If it doesn't work, I correct manually the WB.
    https://discussions.apple.com/thread/3942768?start=0&tstart=0
    We have to report this bug to Apple.

  • Probs with creating a subscribe form with PHP

    Here is my page with the form on -
    http://willowdragonadventureclub.co.uk/index.htm
    The PHP code is attached to this message.
    Or does anyone know a real easy, simple way of creating a
    subsription form?

    I'm new in web design.
    Your form receive the email's user of the webpage ?
    Thanks
    JLRS - MX

  • Flash Contact form with Php Error

    Hi again (".)
    I've making this contact form on flash & i got  the script  for the action script but i'm unable to integrate a php script that would send the mail from my form.
    I'm using two input feilds with instance names as theEmail and theMessage
    Would relly appreciate it if i culd get some help on it. thank you so much.
    Here is the action action script code i'm using -
    snd_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              if (theEmail.text == "" || theMessage.text == "")
                        theFeedback.text = "Please fill in all fields.";
              else
                        // create a variable container
                        var allVars:URLVariables = new URLVariables();
                        allVars.email = theEmail.text;
                        allVars.message = theMessage.text;
                        //send info to a URL
                        var mailAddress:URLRequest = new URLRequest("mail.php");
                        mailAddress.data = allVars;
                        mailAddress.method = URLRequestMethod.POST;
                        sendToURL(mailAddress);
                        theFeedback.text = "Thank You!";
      theEmail.text = "";
                        theMessage.text = "";

    Actaully is i got this Action script from a tutorial and i learnt from it but the mail.php was not part of the tutorial.
    Would you be able to provide me a php script based on the instances names i mention above?

  • Problems printing a form with Adobe 8 Standard

    I created a form using LifeCycle Forms ES and sent it out for use in our company.
    I have received comments back from Adobe 8 Standard users that when they print the form the form rearranges itself.  Has anyone ever run into this issue or know how to fix it?
    Thanks!

    This is basically the same question as : http://forums.adobe.com/message/5405961#5405961
    You can only fill out the PDF forms in Adobe Reader, Adobe Acobat and Acrobat Mobile. Some browser will have Reader plug-ins which would allow you to fill out the form dirrectly in the browser but that is not guarenteed. This is a limitation from the browser (like Chrome) pdf capabilities (they just don't support all the PDF form's features and scripting).
    You will not have the option to embed the form when it is an PDF imported into FormsCentral. This is a feature only available for forms's designed in FormsCentral (web forms).
    We always suggest to people to have a button to download the PDF from their website (not embeded) and that they warn their fillers that they need to fill out the form using Adobe Reader, Acrobat or Acrobat Mobile
    For more information see:
    http://forums.adobe.com/docs/DOC-2013
    http://forums.adobe.com/docs/DOC-2653
    Gen

  • Problems using Acrobat 9 with InDesign CS2

    We have just upgraded from Acrobat 7 to version 9 but are still using CS2 for everything else(don't ask!!!). However, when we use the Adobe pdf presets, they still seem to be using the version 7 job options. I've tried to load up the new job options (from C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings) but it says 'cannot import presets from this file'.
    IT are not being very helpful with this, so I need help please! Microsoft office seems to be using version 9, and I can make a postscript file using version 9 in the print window of InDesign, but for some reason I can't get the programme to recognise the new presets.
    Thanks v much

    David,
    When you print to PDF (or Distill in two steps), your transparency gets flattened BEFORE the PDF is made, so the transparency is not really there, just the "appearance" of the transparency. Exporting to PDF 1.4 (Acrobat 5) or later keeps the transparency "Live" in the PDF so that flattening can be handled in the RIP, as well as eliminating flattening artifacts (referred to as stitching, which appear as thin white lines along the borders of transparent regions in front of a colored background) during on-screen viewing.
    Although Illustrator is not a general purpose PDF editing tool, it can be instructive to do a little demonstration of the difference in the structure of the same file exported and printed to PDF. Start by placing a photograph as a background, then use one of InDesign's shape tools to put a filled shape in front of the photo, and apply a drop shadow to the shape. Export and print using the Press Quality preset (which will keep the transparency live in the export, but the printed PDF will be flattened, despite its PDF 1.4 compatibility).
    First, you'll probably see stitching in Acrobat on the printed version, and it may be lighter in appearance overall than the exported version. Now open the two version in Illustrator. Open the layers panel and keep expanding the groups until you are able to isolate the shape and drop shadow elements (in the exported version the shadow will probably be grouped with a clipping mask, while in the printed version the shadow may be in several pieces and has been burned into a copy of the background photo). Try to select the shape and shadow and move them relative to the background.
    Mostly, though, I was referring to the fact that you can't use bookmarks, buttons, or other interactive elements in Printed PDF.

  • Process Adobe Form with MDB's

    I am trying to develop an automated process that receives an Adobe Interactive Forms as an email attachment and performs a bapi call to an R/3 backend. I plan to use an XI interface that will monitor a email inbox and deliver the pdf as a message to an JMS queue. Once the message has been delivered to the JMS queue a Message Driven Bean will process the message (pdf form). This MDB needs to extract the data from the form and call a bapi on the R/3 backend (JCo). At this point I am trying to develop the MDB.
    Can someone provide any hints or code example that I could use in the MDB that could extract the data from the pdf form?

    Hello Marc,
         Yes, you can do it. The below method will not call the adobe form FM twice and you don't even need to create a new master page.
    If the value of header field in Master page changes each time, You need to JavaScript for this.
    So you will be having some dynamic data in design view based on which the header will be changing. So fill the value of header in the design view. And write the JavasScript code on the Header Text field of Master page in Ready Layout event as below.
    var currpage = xfa.layout.page(this);
    var fields = 0;
    fields = xfa.layout.pageContent(currpage-1, "field", 0);
    for ( i=0; i<= fields.length-1; i++ )
              if ( fields.item(i).name == "HEADER" )
                        this.rawValue = fields.item(i).rawValue;
    Here HEADER is the field in the design view which contains the value of Header. So whenever the same master page is triggered each time, the Header in the Master page is filled using this HEADER field from design view.

Maybe you are looking for

  • JSF 1.2 + JSTL 1.2 + JSP 2.1

    am using netbeans 6.0 beta and glassfish. can i assume it has all JSF 1.2 + JSTL 1.2 + JSP 2.1 since it is the latest.

  • FileMaker Pro 8

    Hi. Here's a fairly simple problem. I've got a database of IP addresses with two tables: Table 1 - IP_Addr (main table) Table 2 - IP_Usage Tables are related through match field "IP_Address" Table IP_Addr stores individual (and unique) IP addresses T

  • Output type not accepting Comm method 5 - External send

    Hi not sure whether this should be posted on the Abap forum or on here ??? I have a shipping output type. assigned Partner functions and applicable mediums - 1, 2 and 5 however when trying to produce ooutput via comm method 5, external send, i am get

  • How to Send a logic project between people??

    Need to send a Logic project of mine to a friend a few hours away, What is the best way to do this? What save options do I have to choose for it to open as the project is on my mac on theirs so they can start editing and mucking around with it? Thanx

  • No connection for LoadVars

    I'm using Flash Prof 2004, All other software connects to internet fine, except for flash 2004 swf files made in 2004 authoring app. I have Flash player version 7 installed. I've turned off my firewalls and still no connection from any swf within fla