if (not isdefined("form.stage")) form.stage = 1;
function IsEmail(str) {
if (REFindNoCase("^['_a-z0-9-]+(\.['_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))$",str)) return TRUE;
else return FALSE;
}
variables.error = arrayNew(1);
form.optionsUsed = 0;
form.subtotal = 0;
switch (form.stage) {
case "2" :
form.noDelegates = 0;
//if ((form.d_one_e_one_sr EQ 0) and (form.d_two_e_one_sr EQ 0) and (form.d_two_e_one_nsr EQ 0) and (form.d_both_e_one_sr EQ 0) and (form.noDiners EQ 0)) foo = arrayAppend(variables.error, "Please select at least one event to attend");
for (x=1;x LTE listlen(form.fieldnames);x=x+1) {
thisField = listgetat(form.fieldnames, x);
if ( left(thisField, 6) EQ 'option' ) {
form.noDelegates = form.noDelegates + evaluate("form.#thisField#");
}
}
if (form.noDelegates EQ 0) foo = arrayAppend(variables.error, "Please select the total number of individual delegates");
break;
case "3" :
if (isdefined("form.numOptions")) {
for (x=1;x LTE listlen(form.fieldnames);x=x+1) {
thisField = listgetat(form.fieldnames, x);
if ( left(thisField, 6) EQ 'option' ) {
form.optionsUsed = form.optionsUsed + 1;
"form.option#form.optionsUsed#" = evaluate("form.#thisField#");
thisPrice = listlast(thisField, "_");
form.subtotal = form.subtotal + evaluate("form.#thisField#") * thisPrice;
}
}
}
if (not len(form.title)) foo = arrayAppend(variables.error, "Please select your title");
if (not len(form.firstname)) foo = arrayAppend(variables.error, "Please enter your first name");
if (not len(form.lastname)) foo = arrayAppend(variables.error, "Please enter your surname");
if (not len(form.jobTitle)) foo = arrayAppend(variables.error, "Please enter your job title");
if (not len(form.company)) foo = arrayAppend(variables.error, "Please enter your company name");
if (not len(form.address1)) foo = arrayAppend(variables.error, "Please enter the first line of your address");
if (not len(form.postcode)) foo = arrayAppend(variables.error, "Please enter your postcode");
if (not len(form.telephone)) foo = arrayAppend(variables.error, "Please enter a contact telephone number");
if (not len(form.email)) {
foo = arrayAppend(variables.error, "Please enter your email address");
} else if ( not IsEmail(form.email) ) {
foo = arrayAppend(variables.error, "Sorry, the email address you entered is not recognised. Please check for typing mistakes.");
}
if (not len(form.hearAbout)) foo = arrayAppend(variables.error, "Please select how you heard of the event");
if (not isDefined("form.readAndUnderstand")) foo = arrayAppend(variables.error, "Please confirm you have read and understood the online booking terms and conditions");
if (not isdefined("form.paymentMethod")) {
foo = arrayAppend(variables.error, "Please select your preferred payment method");
} else if (form.paymentMethod EQ 1) {
if (not len(form.invoicePO)) foo = arrayAppend(variables.error, "Please enter your Purchase Order No.");
if (not len(form.invoiceAddress1)) foo = arrayAppend(variables.error, "Please enter the first line of your invoice address");
if (not len(form.invoiceName)) foo = arrayAppend(variables.error, "Please enter your invoice name");
if (not len(form.invoiceEmail)) foo = arrayAppend(variables.error, "Please enter your invoice email address");
if (not len(form.invoicePostcode)) foo = arrayAppend(variables.error, "Please enter your postcode");
if (not len(form.invoiceTelephone)) foo = arrayAppend(variables.error, "Please enter your telephone number");
}
break;
}
if (arraylen(variables.error)) form.stage = form.stage - 1;
SET NOCOUNT ON
INSERT INTO tblBooking2008 (
option#oU#,
noDiners, noDelegates, total, VAT, grandTotal, invoicePO, invoiceAddress1, invoiceAddress2, invoiceAddress3,invoicePostcode, invoiceName, invoiceEmail, invoiceTelephone, invoiceFax, marketing1, marketing2, readAndUnderstand)
VALUES (
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
)
SELECT @@IDENTITY AS bookingID
SET NOCOUNT OFF
INSERT INTO tblBookingsToDelegates2008 (bookingID, delegateType, speedNetworking, title, firstname, lastname, jobTitle, company, address1, address2, address3, postcode, telephone, fax, email, hearAbout, isPrimaryDelegate)
VALUES (
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
1
)
INSERT INTO tblBookingsToDelegates2008 (bookingID, delegateType, speedNetworking, title, firstname, lastname, jobTitle, email, isPrimaryDelegate)
VALUES (
,
,
,
,
,
,
,
,
0
)
'>
BOOKING FORM
Confirmation
Combo Deals
Includes:
Choice of conference stream
Place at DCA awards
Hotel accommodation on 23 October
#form.option5_629#
£#evaluate("form.option5_629") * 629#
Includes:
Choice of conference stream
Place at DCA awards
#form.option4_529#
£#evaluate("form.option4_529") * 529#
Conference Only
Includes:
Choice of conference stream
#form.option1_399#
£#evaluate("form.option1_399") * 399#
Awards Only
Includes:
Place at DCA awards
Hotel accommodation on 23 October
#form.option3_299#
£#evaluate("form.option3_299") * 299#
Includes:
Place at DCA awards
#form.option2_199#
£#evaluate("form.option2_199") * 199#
Sub Total:
£#lscurrencyformat(form.subTotal,"none")#
VAT:
£#lscurrencyformat(form.VAT,"none")#
Grand Total:
£#lscurrencyformat(form.grandTotal,"none")#
You haven't selected any conferences - please go back