I am using Adobe Designer 7. I want to be able to populate the Subject and Body of the email message that is created when the user clicks on the [Submit By Email] button. I would like be use form fields filled in by the user prior to them clicking the button.
Instructions
1. Add a text field for entering the email address
2. In the Object properties of the Submit button click the Submit tab
3. In the submit to box, enter a subject
Example: mailto:info [at] yourwebsite [dot] com?subject=Information RequestWhen the email button is clicked. An email message is displayed with the specified address.
Note: Specify the button as a submit button before typing the preSubmit event. The script will point to the first element specified for the button.
Script - validate event of TextField1
var address = new RegExp();
address.compile("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,3}$","i");
var result = address.test(this.rawValue);
if (result == true){
true;
} else {
false;
}
Script - click event of the email button
this.resolveNode("#event").submit.target = "mailto:" + TextField1.rawValue + "?
subject=email data
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.