What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    about scale rating, how can I get the post data from thanks you page using php

    Asked by baby3873575 on July 11, 2014 at 12:15 AM

    HI, I just wanna get the scale rating data, on my thank you page I use:  but I can't get the value of scale rating,

    I only get the key of scale rating but not value.

    <?php

    header('Content-Type: text/html; charset=utf-8');

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

            print "key is ".$key."<br>";

    if($value !== "" && $key !== "formID" && $key !== "ip"){

    if (is_array($value)){

    foreach($value as $arrkey => $arrval)

    {

    print "Field ".htmlspecialchars($key)." is "."$arrval <br/>";

    }

    }

    }

     

           else {

         print "Field ".htmlspecialchars($key)." is "."$value <br />";

           }

    }

    ?>

     

    Page URL:
    http://form.jotform.me/form/41852996224463?

  • Profile Image
    JotForm Support

    Answered by EltonCris on July 11, 2014 at 08:49 AM

    Hi,

    The problem is within your conditional statement.

    if($value !== "" && $key !== "formID" && $key !== "ip"){

    If you want the non-array field values to display, I think you should make the conditions like the following but this does not display the array field values. "is equal ==" instead of "is not equal !=="

    if($value == "" && $key == "formID" && $key == "ip"){

    If you want everything to be displayed without exemption even if non-array or array, you can use the following.

    if(is_array($value)){

    This should work like the following form.

    http://form.jotformpro.com/form/41913126680957?

    Sample output:

    You can take the final script here if you like. http://pastebin.com/raw.php?i=Hktngbng

    If you need further assistance, let us know.

    Regards!