Hi Mike,
This can be achieved by using following javascript in pdf template. Please feel free to edit it further to achieve desired result.
a. Add following javascript to resources for pdf template.
b. Use the added javascript in content div of page layout for the pdf template (as mentioned below).
c. Enable Javascript at preset level and select above template to preset.
d. Generate the pdf.
//Javascript
window.addEventListener('DOMContentLoaded', function () {
const elements = document.querySelectorAll('div.other.note[data-attr-othertype]');
elements.forEach(element => {
const prefixSpan = element.querySelector('span.prefix-content');
if (prefixSpan) {
prefixSpan.textContent = element.getAttribute('data-attr-othertype') + ': ';
}
});
});
//Add js to content div in Page Layout
<div data-region="content">
<script src="a.js" type="text/javascript"></script>
</div>
Please let me know if this works for you.
Regards,
Tulika Aggarwal