I have been using below successfully for years on a form and have recently extracted a one page short version of the form, and deleted 6 of the pages. The email submit button is no longer working on the one page version (though still works great on other version). Checked to be sure no fields that are used in the submit button code were removed, they are all still in-tact in the one page version. When I distribute and test, it will get to the instructions, but when I click the ok the bring up the email, it just beeps and nothing happens. It seems to be only using 3 fields - the SubjectDate, which is a date field (FormCalc setting = $.rawValue = Num2Date(date(),"YYYY")), the Company_Name and Contact field, which are still on the form. Any ideas what I may have missed or accidentally deleted when making the one page version? Thank you.
// First give a messageBox with instructions
xfa.host.messageBox("This will open your email client and prepare an email for you. " +
"Please make sure you send the email to complete the process." +
"\n\nIf you experience any difficulties or if you are using a " +
"web based email client, then please save this form and " +
"manually email it to first.last@email.com\n\nThank you!", "Email Instructions", 3, 0);
xfa.host.beep("3");
// then pass instructions through to email client
var vEmail = "first.last@email.com";
var vSubject = SubjectDate.rawValue + " Procurement Info: " + Company_Name.rawValue
var vBody = "Hi\n\nPlease find our attached completed Procurement Info form.\n\nRegards,\n\n" + Contact.rawValue
var obj = event.target;
event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody,cSubmitAs:"PDF",cCharset:"utf-8"});obj.close();
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
While the three objects may still be on the form, the relative reference from the button to all/any of the objects may be different. For example, all three references are on the basis that the three objects are in the same container as the button.
Check that the relative references are correct. See a discussion and example here: http://assure.ly/kUP02y.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
While the three objects may still be on the form, the relative reference from the button to all/any of the objects may be different. For example, all three references are on the basis that the three objects are in the same container as the button.
Check that the relative references are correct. See a discussion and example here: http://assure.ly/kUP02y.
Hope that helps,
Niall
Views
Replies
Total Likes
Thank you, that resolved it, with help of your link, ended up changing the Company_Name to:
xfa.resolveNode("Table1.Row2[1].Company_Name")
Now it is working great, thank you.
Views
Replies
Total Likes
Views
Likes
Replies