Send Post Method - PHP File is attached to Custom Thank You Message

  • Profile Image
    Asked on October 23, 2013 at 12:06 PM

    I want to set up a confirmation page (easy enough) and THEN I want to save the form POST data to my locally hosted database.  At the moment, I can do one or the other, but not both.



  • Profile Image
    Answered on October 23, 2013 at 01:45 PM

    You can easily do this by doing the following steps below:

    1. From the Form Builder click "Setup & Embed" tab

    2. click "Preferences" button from the Toolbar above

    3. Click "Advanced Settings" tab

    4. Make sure that you set "Yes" on "Send POST data"


    5. Go to "Setup & Embed" again

    6. Click "Thank You" button

    7. Choose "Custom URL" and click Next


    8. Paste the link to your PHP or ASP/ASPX page that will catch the POST variabled on the session. From this page that you will create, you can also do a header redirect to your confirmation page after it catches and process the POST variables to your Database.


    If you need further help, please do not hesitate to ask. Thanks

  • Profile Image
    Answered on October 23, 2013 at 02:04 PM

    Thank you very much for that! I haven't tried it yet, but it makes sense. I was trying to do things in the reverse order, ie, confirm first then capture the data locally, but your solution catches the data locally first, then redirects to the confirm page. Thanks again. I will let you know if I run into any snags.

  • Profile Image
    Answered on October 23, 2013 at 03:15 PM

    In behalf of my colleague you let me tell you it's a pleasure to assist you. Don't hesitate to contact us if you need further assistance with this or just open a new thread to make unrelated questions.

    Thanks for using Jotform.

  • Profile Image
    Answered on October 23, 2013 at 06:51 PM

    Hit a snag with this. 

    My standalone php page works fine to 1) get post data and 2) to redirect to the confirm page. 

    But my confirm page is not populated with the POST data, nor does it have choices to 'edit' or 'complete submission'.  

    The confirm page url I used was:  - the sid comes from _POST variable session_id

  • Profile Image
    Answered on October 23, 2013 at 07:29 PM

    That is because you need to get the populated IDs and append there your Post variables for each field ID. These IDs are different than the ones you see on the notification templates.

    You may use our Field Prepopulator App which can really make your life easier in getting the right IDs[first]=duncan&contactName[last]=Boan&businessCategory=Testing%20Things&topProblems=Problemssolved&commonCharacteristics=Characteristics&clientReasons=Reasons&uniqueBenefits=Benefits&mostWanted=Telephone%20Call&[month]=10&submitted[day]=24&submitted[year]=2013&otherComments=comment&primaryMarketing=Marketing&sid=248377494231681655&mode=edit


    All the black bolded parts are IDs and non bolded parts are values in which you can switch these values with your POST variables. The red bolded is your sid and the edit mode I just added it manually and not included in the generated URL of the app.

    These are not the rest of the IDs. There are still more but it seems the Field Prepopulator app can not work well on multiple pages or long forms it only shows part of them.

    I advise to clone your form and use that instead in the app and delete the fields as you go on the cloned form from the Form builder and reauthenticate the app again until you get all of the ID fields.


    To use the App:

    1. Click "Populate Fields" Button

    2. Click "Allow" to authorize and give permission to this app

    3. Choose the form "Marketing Message Discovery"(The example is using a different form)

    4. Fill in the required textboxes and all you can find. This is just temporary data so you can generate the link


    I would like to note that there are restriction on the maximum character length on a URL in the address bar. Please read more on What is the maximum length of a URL?

    Please let us know how it turns out. Thanks.

  • Profile Image
    Answered on October 23, 2013 at 08:10 PM

    Thanks again for your good info. The App doesn't want to play nice, so before I try to figure that out,   istead of building an enormous query string, is there a way to use sessions to pass the key/value info?

    If sessions aren't available, and if I can't get the App to work nicely, I'll build the query string manually, but can I use the array elements as output using  print_r( _POST )  (eg: 

    [submission_id] => 248201797231429505

        [formID] => 32827434886870

        [ip] =>

        [businessname] => Acme Business Machines Ltd

        [businessaddress7] => Array


                [0] => 123 Some Street

                [1] => 

                [2] => No City

                [3] => BC



  • Profile Image
    Answered on October 23, 2013 at 11:23 PM

    Hello, just to make sure if this is what you want to achieve, kindly take a look at this thread as an example:

    Do let us know, to help you better, thank you.

  • Profile Image
    Answered on October 23, 2013 at 11:27 PM

    Sorry - don't know anything about cold fusion. I use php.

  • Profile Image
    Answered on October 24, 2013 at 02:45 AM


    You can construct your own edit URL out of the formID and Submissions ID. These are the only data you need.


    Define a variable for SID and FormID on php.

    $sid = $_POST['submission_id'];

    $formID= $_POST['formID'];

    Then on the HTML code, you can call the variables like this:

    <a target="_blank" href="<?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit"><?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit</a>


    Example: You can copy and save this as php file.


    $sid = $_POST['submission_id'];

    $formID = $_POST['formID'];



    <head><title>Get Edit URL</title></head>


    <H1>Hello! here's your edit URL</h1>

    <a target="_blank" href="<?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit"><?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit</a>




    Let us know if you have further questions. Thanks!

  • Profile Image
    Answered on October 24, 2013 at 11:54 AM

    @EltonCris or @ardy0689

    I reexamined my redirect url and it had a typo, so following the steps first outlined above by ardy0689 I'm able to capture the POST data locally and then redirect to the form submission page with the data intact.  

    However, it's not exactly what I wanted. As I mentioned in the beginning, I want the redirect (on my local php page) to go to your 'confirmation page' - that is, where the data is presented to the user for review, along with two buttons  - edit, and 'complete submission'.  

    Is this possible?

  • Profile Image
    Answered on October 24, 2013 at 12:42 PM

    Well in that case, you may want to try creating your own simple confirmation page where you state all the fields and their values in plain text format or in a table format which is then hosted from your website.

    At the bottom of this is the Confirmation page. There will be An Edit Link and Complete Submission.

    The Complete Submission can be redirected to the home page or from the original form or perhaps your own thank you page.

    Since you still have your POST variables this is where my colleague Elton's suggestion will take place by linking it to the edit mode URL and by using this anchor tag hyperlink which is accompanied by your inserttable POST variables


    <a target="_blank" href="<?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit"><?php echo $formID; ?>&sid=<?php echo $sid; ?>&mode=edit</a>


    Example Plain text or Table:

    Business Name*: My Company
    Business Address:
              Street Address: Street 1
              City:No City

    ...and so on

    Edit Link | Confirm Submission



    Let us know what you think about this route. Thanks

  • Profile Image
    Answered on October 24, 2013 at 01:58 PM

    Good, that's what I'll do.

    (I was kind of hoping I wouldn't have to create the display page because I was hoping to use your css to keep the presentation consistent.) 

    I really appreciate your help with this. 

  • Profile Image
    Answered on October 24, 2013 at 02:43 PM

    You are welcome. If you want to push it further, you could do that as well if you like and to make your presentation consistent but that includes downloading the form source codes and files.

    Step 1:


    Step 2:


    Step 3:You will download a ZIP file and you need to extract it to a folder


    Step 4:You need to edit your HTML file and remove this submit button section enclosed in the border manually.


    Deleting the form action is a nice thing to do like the one below:



    With that, you can prevent them submitting the actual form.It is just only for the presentation after all. After that fill in every field with your POST variables via PHP code and add your EDIT LINK and COMPLETE SUBMISSION LINK at the bottom or from the place where the submit button was previously deleted. You can keep the presentation in this manner.