Dev experience has been one of the worst products I’ve wrangled in. Documentation is a mess. Found the right solution in the legacy API docs. Heavy eye roll.
Here’s what worked for me:
Set form to Thank You message. Fill Thank You message Rich Text Field with a few
Navigate from Edit tab to Options tab. Click Advanced. Edit the Footer field with the following Script —
<script>
window.addEventListener('message', event => {
if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') {
let el = document.querySelector('.submitted-message');
let newHTML = "<div>Your HTML here</div>";
el.innerHTML = newHTML;
}
});
</script>
Your content editor won’t be happy, but this opens up possibilites. For us, we needed a Kiosk mode form that had a query parameter refresh link. I was able to inject such a button with the above script.
No promises that this will work tomorrow.