Can I 'tidy' up Send Post Data on Thank You page or choose which fields to display?

  • Profile Image
    williethemilk
    Asked on September 27, 2010 at 10:19 AM

    Hello :) I am loving using jotforms, my only problem I am having, is that I would like to post the submitted data from the form on my Thank You page. What I mean is I would like ONLY the selected data to show up on the Thank You page, and to omit the sections of the form that have been left blank. Also is

    On my thank you page, which is test.php, I have tried using the:

    <pre><? print_r($_POST); ?></pre> 

    But this is showing me all the results, for example on this gform, I have ordered 3 chicken cesars, but this is what is being returned on my thank you page:

    Array ( [submission_id] => 151406822941064247 [formID] => 2663942288 [softdrinks] => [freshorange39] => [chicken] => [greekfeta] => [chickenceasar] => 3 Any help or advice would be very gratefully received!
    Steve 

  • Profile Image
    aytekin
    Answered on September 27, 2010 at 10:50 AM

    I think you need something like this:

    <?

     foreach($_POST as $key => $value){

        if($value !== ""){

            echo "$key: $value \n<br />\n";

       }

     }

    ?>

  • Profile Image
    williethemilk
    Answered on September 27, 2010 at 11:02 AM

    Hi & thanks for the reply speedy Aytekin :)

    I tried this, but this is what I now get....

    submission_id: 151412370941064247 
    formID: 2663942288 
    croissants: 4 
    regularfillings35: Array 
    fullname73: Array 
    email72: stevexxxx@gmail.com 
    address74: Array 
    phonenumber75: Array

    How would I get it to actually display the values I had filled in, e.g. name, address, types of fillings etc?

    Steve

  • Profile Image
    aytekin
    Answered on September 29, 2010 at 09:07 AM

    Do this to find out the field names:

    <pre><? print_r($_POST); ?></pre>

    Then, write PHP code to show the values.

  • Profile Image
    markashton
    Answered on April 13, 2011 at 09:27 AM

    You know

    I wish you'd have expanded on that last point :(

    That would have helped.

    Any chance of an example of a Custom Thankyou Page that uses 'Send Post Data' with the values formatted.

    Those non-coders could reverse engineer the problem rather than having to pay someone for a job we are nearly there on

    Thanks Mark

  • Profile Image
    liyam
    Answered on April 14, 2011 at 11:32 AM

    Thank you for pointing this out, Mark.

    We understand that somehow we're lacking some bits of information in our user guide page. We are currently updating the outdated guides and creating new ones for the new features as well. 

    This also slipped my thought so I appreciate that you have raised this concern, I will put this in my list and work on some quick tutorial guide on how to make use of the send post data feature of JotForm soon.

    Thanks again.

  • Profile Image
    khrisell
    Answered on July 04, 2013 at 05:53 PM
    Greetings!

    We are happy to announce that we have released Jotform Webhooks,  this feature would replace Send Post Data + Custom URL Thank You Page workaround in order to help you transfer forms data to your own database using your own script codes.

    To know more about Jotform Webhooks, please click here.

     

    Thank you for using JotForm. :)