Good afternoon all.
I am working with a form that consists of 6 user filled text boxes, a dynamic table with 4 columns and a submit button. Currently, I have the submit button take data from one of the text boxes and enter it into the subject line and body of the email.
What I am having difficulty with now is the table. I can get the data from the first row to display in the body of the email, but if new rows are created with data entered, that data does not make it to the email.
This is the code that I have right now.
var subject = "Inventory for: " + mainPage.userDetails.userName.rawValue;
var myDoc = event.target;
var emailBody = "Attached is the inventory for " + mainPage.userDetails.userName.rawValue + ".\n" +
"Model: " + this.hardwareModel + ". " +
"Old Service Tag: " + mainPage.eqDetails.eqTable.Row1.oldST.rawValue + ". " + "New Service Tag: " + mainPage.eqDetails.eqTable.Row1.newST.rawValue + ". ";
try {
myDoc.mailDoc({
bUI: false,
cTo: "Email addresses",
cCC: "Email Addresses",
cSubject: subject,
cMsg: emailBody,
cSubmitAs: "PDF"
});
} catch (e){
}
I realize part of the problem is the code is only looking at the first row. I have some code to count the number of rows, but as to how to get it to step through the number of rows and display each row of data. If it can be set to not display null data that would be nice, but not necessary.
Any help or a point in the right direction would be appreciated.
Thanks in advance,
Sean