I have the following Javascript I'm using to pass values from 5 textarea fields to an email function. I'm trying to create an "online workbook" where the user uses the textareas to write out their notes. The problem I'm having is that the text from the textarea fields are getting cut off and once I reach an excess of characters, not all the textarea fields are included.
Is there a way to increase that limit so all the contents within the textareas can be emailed?
<script>
function emailForm(href) {
var subject = "This form data";
var body = "Notes:\r\n\r\n";
body += "<ta1>\r\n";
body += document.getElementById("ta1").value;
body += "\r\n\r\n<ta2>\r\n";
body += document.getElementById("ta2").value;
body += "\r\n\r\n<ta3>\r\n";
body += document.getElementById("ta3").value;
body += "\r\n\r\n<ta4>\r\n";
body += document.getElementById("ta4").value;
body += "\r\n\r\n<ta5>\r\n";
body += document.getElementById("ta5").value;
body += "\r\n\r\n";
var uri = "mailto:?subject=";
uri += encodeURIComponent(subject);
uri += "&body=";
uri += encodeURIComponent(body);
window.open(uri);
}
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Send form data in an email</title>
</head>
<body>
<textarea id="ta1"></textarea>
<textarea id="ta2"></textarea>
<textarea id="ta3"></textarea>
<textarea id="ta4"></textarea>
<textarea id="ta5"></textarea>
<input type="button" onclick="emailForm();" value="Submit">
</body>
</html>