This question might be a long shot, but I am unable to find anything within the googles.
Currently, I am using javascript that gets the textarea input and downloads it into a txt file.
HTML input in form:
<textarea rows="7" type="text" id="detailsField" placeholder="Enter call details"></textarea>
If the text area contains multiple lines, the output places those multiple lines into one long line.
Example: What was typed into text area:
Details1 details2
details3
What the output looks like in the txt file:
Details1 details2 details3
Javascript for downloading form into a txt file:
// EXPORT FORM TO TXT FILE
function buildData (){
var txtData =
"Time & Date of Submission: "+$("#timeField").val()+
" "+$("#dateField").val()+
"\r\nClient's Name: "+$("#nameField").val()+
"\r\nCompany Name: "+$("#companyField").val()+
"\r\nDetails: "+$("#detailsField").val();
return txtData;
}
$(function(){
$("#submitLink").click(function(event){
var txtData = buildData();
$(this).attr('download','Call Log.txt')
.attr('href',"data:application/octet-stream;base64,"+Base64.encode(txtData));
});
});
I am not very strong minded with JS so as much detail as possible would be appreciated.