addField("Name", true, "text", "", "", "", "");
$formValidation->addField("Email", true, "text", "email", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
//start Trigger_SendEmail trigger
//remove this line if you want to edit the code by hand
function Trigger_SendEmail(&$tNG) {
$emailObj = new tNG_Email($tNG);
$emailObj->setFrom("{KT_defaultSender}");
$emailObj->setTo("contact@haddamhistory.org");
$emailObj->setCC("{Email}");
$emailObj->setBCC("");
$emailObj->setSubject("Contact Form Submission from CtAntiquesShow.org");
//WriteContent method
$emailObj->setContent("The Following was sent by:\nName: {Name}\nEmail: {Email}\nComments/Questions: {Comments_Questions}\n");
$emailObj->setEncoding("ISO-8859-1");
$emailObj->setFormat("Text");
$emailObj->setImportance("Normal");
return $emailObj->Execute();
}
//end Trigger_SendEmail trigger
//start CheckCaptcha trigger
//remove this line if you want to edit the code by hand
function CheckCaptcha(&$tNG) {
$captcha = new tNG_Captcha("captcha_id_id", $tNG);
$captcha->setFormField("POST", "captcha_id");
$captcha->setErrorMsg("Please type in the characters exactly as they are shown below.");
return $captcha->Execute();
}
//end CheckCaptcha trigger
// Make a custom transaction instance
$customTransaction = new tNG_custom($conn_csas);
$tNGs->addTransaction($customTransaction);
// Register triggers
$customTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Custom1");
$customTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$customTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "thanks.htm");
$customTransaction->registerTrigger("AFTER", "Trigger_SendEmail", 98);
$customTransaction->registerTrigger("BEFORE", "CheckCaptcha", 10);
// Set custom transaction SQL
$customTransaction->setSQL("select *\nfrom email_forms");
// Add columns
$customTransaction->addColumn("Name", "STRING_TYPE", "POST", "Name");
$customTransaction->addColumn("Email", "STRING_TYPE", "POST", "Email");
$customTransaction->addColumn("Comments_Questions", "STRING_TYPE", "POST", "Comments_Questions");
// End of custom transaction instance
// Execute all the registered transactions
$tNGs->executeTransactions();
// Get the transaction recordset
$rscustom = $tNGs->getRecordset("custom");
$row_rscustom = mysql_fetch_assoc($rscustom);
$totalRows_rscustom = mysql_num_rows($rscustom);
// Captcha Image
$captcha_id_obj = new KT_CaptchaImage("captcha_id_id");
?>
Connecticut's Spring Antiques Show: Contact us
displayValidationRules();?>