Show a summary calculated from webform submitted values on the submission preview page only (not on form) and re-use in e-mail handler We need to display a computed summary of submitted information on both the submission preview page and in e-mails that are sent out.
I'd expect this is a common usecase and wanted to check if i'm missing something obvious before cobbling something together (and documenting that and leading others astray!)— like figuring out if computed twig elements can be excluded from the original form, and if the same computed twig elements can be pulled into the email handler easily.
Thanks for any assistance!
(Edited body and title: clarified that this need is for the submission preview page, not the Webform 'confirmation' page)
It's not the way i'd prefer to do it, but as far as putting customization on the preview page, there is at least an alternate template available for that:
 FILE NAME SUGGESTIONS:
   * webform-submission-data--preview.html.twig
   * webform-submission-data--webform-10152--preview.html.twig
   * webform-submission-data--webform-10152.html.twig
   x webform-submission-data.html.twig

Rather than use the overall template above, we decided to do most of the work in a preprocess function for a key element on the webform.  This only affects the preview page, as it's about the HTML display not the form element.
function example_preprocess_webform_element_base_html__example_element__specific_instance(&amp;$vars) {
  $rows = example_summary($vars['webform_submission']);
  $vars['table_summary'] = [
   '#type' =&gt; 'table',  
   '#rows' =&gt; $rows,
  ];
}

We can take the {{ table_summary }} variable we added there and include it in the custom template for that element, webform-element-base-html--example-element--specific-instance.html.twig.