How to show the specific cell value of matrix field in the thank you message?

  • lxrogers
    Asked on September 23, 2014 at 2:30 AM
    Well like I said I know how to populate the second form. what I don't understand is how to get the cells from the form  in the thank you url. For example {myMatrix:0} just returns "Array" and {myMatrix:0:0} doesn't work either. Neither does {mMatrix[0][0]} or {myMatrix}[0][0].
  • jonathan
    Replied on September 23, 2014 at 6:47 AM

    Hi,

    As far as I know this is not possible using the form builder only within the jotform Thank You page.

    It is possible though if you will use SEND POST DATA method and Custom Thank You page.

    Follow this user guide https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

    How to show the specific cell value of matrix field in the thank you message? Image 1 Screenshot 40

     

    How to show the specific cell value of matrix field in the thank you message? Image 2 Screenshot 51

     

    Basically, you will pass the Post data form the matrix cell into your custom page.

    How to show the specific cell value of matrix field in the thank you message? Image 3 Screenshot 62

    Hope this help. Inform us if you need more assistance.

    Thanks!

     

     

     

  • lxrogers
    Replied on September 23, 2014 at 4:42 PM

    Thank you for your response. If anybody is looking for a solution, here is mine. Note: I used Matrix Dynamique for form 1 and Survey Tools Matrix for form 2. 

    I hosted this php file call reimburse.php on my own hosting, and then I used the custom url redirect with POST data to redirect to that file. Here is the important part of reimburse.php:

    //add matrix variables

    $expenseName = "Expense";//col 1 name

    $projectedCostName = "Projected Cost";//col 2 name

    $expenses = json_decode($_POST['projectedexpenses']);// projected expenses matrix name

    for ($x=0; $x<count($expenses); $x++) {

    // expenses is the matrix name in form 2

    $url = $url."expenses[".$x."][0]=".$expenses[$x]->$expenseName."&";

    $url = $url."expenses[".$x."][1]=".$expenses[$x]->$projectedCostName."&";

    }

    $url = str_replace(' ', '%20', $url);

    echo "Please save this URL to complete your reimbursement form, after purchases have been completed:";

    echo "
    ".$url."";

    If anybody knows how to limit the number of responses for Matrix Dynamique that would be helpful.

     

  • Welvin Support Team Lead
    Replied on September 23, 2014 at 6:02 PM

    Unfortunately, you cannot limit the Matrix Dynamique widget entry.

    You can use our Configurable List Widget: http://widgets.jotform.com/widget/configurable_list. This is the closest widget that you can use and limit the number of rows.

    Thank you!