Print submitted data on confirmation page

Last updated on
30 April 2025

Copy webform-confirmation.tpl.php from /webform/templates and into your theme's template folder. Rename it to webform-confirmation-{nid}.tpl.php to apply the template to a specific webform. Make sure you clear Drupal's cache after placing or renaming the template file.

Edit the template with this underneath the webform-confirmation div, or wherever you like.

  // Print the webform submission to the submitter
  include_once drupal_get_path('module','webform') . '/includes/webform.submissions.inc';
  $submission = webform_get_submission($node->nid, $sid);
  $email = NULL;
  $format = "html";
  print webform_submission_render($node, $submission, $email, $format);

That will print the submitted values similar to how you view a submission in the Results tab.

Note: The format must be lower-case "html", without any capitals.

Help improve this page

Page status: Not set

You can: