Customizing form submission buttons can provide a more dynamic form, such as presetting parameters for e-mail out a form!
var sendTo = this.getField("sendTo").value;
var ccTo = this.getField("ccTo").value;
var theSubject = this.getField("theSubject").value;
var emailBody = this.getField("emailBody").value;
The parameters are set by pulling the values from the Text Fields created within your PDF form (Note: the names of the fields are case sensitive!).
The names under this.getField(“xxxxx”).value; will be the name of the Text Fields, which in return will be plugged into the mailDoc.
For e.g. the text field name for the person to send to is named “sendTo”, which in returns is set as the var sendTo = this.getField(”sendTo”).value;