You were right, all I needed to do is to use the {{#each}} loop and render the array field as a list instead of trying to use a simple placeholder as I was doing, although thankfully it wasn't necessary to do any coding.
Here's the template snippet for an array field called materialsPurchased
Code:
<ul class="list-group"> {{#each materialsPurchased}} <li class="list-group-item list-row">{{this}}</li> {{/each}} </ul>
Note: If printing to PDF the list with the code above will be rendered as an un-styled list because of the TCPDF engine limitations.
Alternative styling to display array field making it more compatible with TCPDF
Code:
{{#each materialsPurchased}} <table><tbody><tr><td>{{this}}</td></tr></tbody></table> {{/each}}
Leave a comment: