Custom Admin Mail Notification with a HTML Field
-
I have a script that when the user clicks submit on the form, it processes the options selected by the user and generates an html that is I want to send in the notification email.
I have tried adding an HTML field to the form and changing the internal html through the script with something like:
let previewField = form.querySelector('#html-x .forminator-field');
if (previewField) {
previewField.innerHTML = <div>${previewHTML}</div>;
}Then in the form’s notification configuration I specify that the email contains only the {html-x} field but the email continues to be sent without the changes that the script made to the field.
I also tried with an input field normally and previewField.value = previewHTML worked but the problem is that everything is saved as plain text and the html tags do not work.
What solution can you recommend, what hooks do you think could help me get what I need?
I Have Forminator V1.35.0
- You must be logged in to reply to this topic.