How to remove the submission title on my Webform’s PDF attachment?

I have been using swift mailer in Drupal 9 to email the submission with a PDF file to the recipient. I have written twig to format the submission in PDF attachment field. However, when I open the PDF file, it is not formatted in a proper way. First, I have been trying to remove that submission #17 on the image but I cannot find it in anywhere, then I want to format the first table better. Here is my twig code in View Mode

<table>     <tr>         <th>Name: </th>         <td>[webform_submission:values:name_]</td>         <th>New Advance: </th>         <td>[webform_submission:values:total_reimbursement_01_new_advance_]</td>     </tr>     <tr>         <th>Begin Date: </th>         <td>[webform_submission:values:begin_date_]</td>         <th>Carry-over amount: </th>         <td>[webform_submission:values:begin_date_]</td>     </tr>     <tr>         <th>End Date: </th>         <td>[webform_submission:values:end_date_]</td>         <td rowspan="3" colspan="2">Total Reimbursement: <input type="number" value="[webform_submission:values:total_reimbursement_01_total_reimbursement_]"></td>     </tr>     <tr>         <th>Destination: </th>         <td>[webform_submission:values:destination]</td>     </tr> </table> <br> <table>     <tr>         <th colspan="2">Beginning Mileage</th>         <th colspan="2">Endling Mileage</th>     </tr>     <tr>         <th>Location</th>         <th>OD Reading</th>         <th>Location</th>         <th>OD Reading</th>     </tr>     {% for distance in data.mileage_count %}     <tr>         <td>{{distanceinitial_location}}</td>         <td>{{distance.initial_od}}</td>         <td>{{distance.final_location}}</td>         <td>{{distance.final_od}}</td>     </tr>     {% endfor %}     <tr>         <th colspan="3">Total Traveled Mileage +/-</th>         <td>[webform_submission:values:item_total_01_traveled_mileage]</td>     </tr>     <tr>         <th colspan="3">Mileage Total</th>         <td>[webform_submission:values:mileage_total_01_mileage_total_]</td>     </tr> </table> <br> <table>     <tr>         <th colspan="7">Expense Items</th>     </tr>     <tr>         <th>Date</th>         <th>Type</th>         <th>Vendor</th>         <th>Attendees</th>         <th>Account Code</th>         <th>Rcpt</th>         <th>USD Amount</th>     </tr>     {% for cost in data.expense_items %}     <tr>         <td>{{ cost.date }}</td>         <td>{{ cost.type }}</td>         <td>{{ cost.vendor }}</td>         <td>{{ cost.attendees }}</td>         <td>{{ cost.acct_code }}</td>         <td><input type="checkbox"></td>         <td>{{ cost.amount }}</td>     </tr>     {% endfor %}     <tr>         <th colspan="6">Item Total:</th>         <td>[webform_submission:values:item_total_01_item_total_02]</td>     </tr> </table> <br> <table>     <tr>         <th>Traveler's Signature:</th>         <th>Director's Signature</th>     </tr>     <tr>         <td></td>         <td></td>     </tr>     <tr>         <th>Date:</th>         <th>Date:</th>     </tr>     <tr>         <td>[webform_submission:values:date]</td>         <td>[webform_submission:values:date_1]</td>     </tr> </table> 

This is my CSS code in settings CSS/JS

th {     background-color: rgba(38, 137, 13, 1);     border: 1px solid rgba(134, 188, 37, 1);     border-left: 1px solid rgba(134, 188, 37, 1);     border-bottom: 1px solid rgba(134, 188, 37, 1);     color: #ffffff;     text-align: center;     vertical-align: middle;     padding: .75em .5em;  }  td {     text-align: right;     border: 1px solid rgba(134, 188, 37, 1);     vertical-align: middle;     padding: .75em .5em;    }  table {     border-collapse: collapse;     border: 1px solid #fff;     empty-cells: show;     margin: 1%;  } 

enter image description here

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

How to remove the submission title on my Webform’s PDF attachment?

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.