Thank you for sending me in the right direction with this.
I had to use the OnBeforeSave event (as opposed to the OnAfterSave) to get it to work.
protected void viewBiz_OnBeforeSave()
{
// put into the form a field containing the e-mail address of the current contact from custom_contact table
this.viewBiz.BasicForm.DataRow["EmailToContact"] = CMS.CMSHelper.CMSContext.CurrentDocument.GetValue("Email_Address");
}
In the
CMS Desk > Tools > BizForms > [Choose Form] > Notification e-mail > To e-mail field I inserted this macro
{%EmailToContact%} which is the extra field I added to my form fields.
One thing to note: I was not able to uncheck the
Show on public form in the Field definition as it removed the field completely from the form. I instead had to set the
Caption style and the
Input style to
display:none so that the field was available when I copied the value into it.