Submit a form vs. Javascript w/required fields
I have a form that will be submitted as a complete PDF. The form has required fields. Tried "Submit a Form" action but I cannot include specific fields from the form in the email subject.
I switched to a Javascript function to submit the form; now I get the specificity of the email I desire (with field answers included in the subject line) but the required fields no longer prevent the form from being sent if they are not filled.
Is there a way to get one method or the other to do both?
1. Not submit form via email unless required fields are filled
2. Place specific field answers in subject of submission email
mailto:email@server.com?subject=CONTENTOFSUBJECT&body=CONTENTOFBODY
OR
var targetEmail = "email@server.com";
var subjectLine = "name" + " " + this.getField("CLINIC NAME").valueAsString + " " + this.getField("DATE").valueAsString ;
var body = "CONTENT OF EMAIL";
this.mailDoc({cTo: targetEmail, cSubject: subjectLine, cMsg: body});
