I have searched a lot on how to do this, but none of the solutions have been successful in my case.
I have built a very simple JS form which will generate text ready to copy and paste straight into an email.
My only problem now is getting that text appear exactly as I want it in the email (i.e. multi line).
Does anyone have any suggestions based on my code below?
Not duplicate. I have already read/tried the examples in the other post and none of them work. Hence why I am creating a new question specifically for my code.
function myFunction3() {
var b, text;
b = document.getElementById("type").value;
if (b === "rfi") {
text = "This is an RFI email";
} else {
text = "This is a bank details request email";
}
document.getElementById("demo3").innerHTML = text;
}
The HTML part is below:
<p id="demo3"></p>