appConfig = Application.ptCalendar.getAppConfig();
formSubmitFieldsList = "uniqueID,category,organization,eventApproved,eventRequestorEmail";
// load jQuery headers
application.ptCalendar.scripts.loadJQuery();
// initialize app working variables
//notifyUsers = "";
//notifyEventContact = "";
processNotifications = "";
// Set the render form or link flag
renderForm = 1;
// Check if we need to display the form
if ( (StructKeyExists(request.params, "renderForm")) AND (IsBoolean(request.params.renderForm)) )
renderForm = request.params.renderForm;
// Set the process flag
processForm = 0;
// Check if we need to display the after submit page
/* if ( (StructKeyExists(request.params, "processForm")) AND (IsBoolean(request.params.processForm)) ) {
processForm = request.params.processForm;
} */
// Check if the form has been submitted
if ( structKeyExists(request.params, "parameters") ) {
processForm = 1;
renderForm = 1;
}
// extract some fields from the simple form
formFieldVals = application.ptCalendar.forms.extractFromSimpleForm(request.params,formSubmitFieldsList);
// Send and Email to the Notification Contacts for each selected Event Category
if ( structKeyExists(formFieldVals,"UniqueID") AND LEN(TRIM(formFieldVals.UniqueID)) )
{
// Handle the processing of all of the notification and approval/denial emails
processNotifications = application.ptCalendar.calEventNotificationService.processEventNotificationEmails(eventID=formFieldVals.UniqueID);
// Send Notification Emails to users who have been assigned to Event Categories
//notifyUsers = application.ptCalendar.calEventNotificationService.notifyUsersByEventID(formFieldVals.UniqueID);
// If approved or denied ... send rejection or approval email to the Contact Email
//if ( structKeyExists(formFieldVals,"eventApproved") AND LEN(TRIM(formFieldVals.eventApproved)) )
//notifyEventContact = application.ptCalendar.calEventNotificationService.sendEventApprovalEmail(formFieldVals.UniqueID);
}
Error Occcured.