Book an appointment
<% function FieldOK(FieldName) if Request.Form(FieldName) = "" and Request.Form("send") then FieldOK = false else FieldOK = true end if end function function FieldWithDefaultOK(DefaultValue, FieldName) if Request.Form(FieldName) = DefaultValue and Request.Form("send") then FieldWithDefaultOK = false else FieldWithDefaultOK = true end if end function %>

<%if Request.Form("send") <> "" then if Request.Form("Prenom") = "" or FieldWithDefaultOk("Jour", "NaissanceJour") = false or FieldWithDefaultOk("Mois", "NaissanceMois") = false or FieldWithDefaultOk("Année", "NaissanceAnnee") = false or Request.Form("CodeRegional") = "" or Request.Form("Tel1") = "" or Request.Form("Tel2") = "" or Request.Form("clinique") = "Choose" or Request.Form("Courriel") = "" then Response.Write("Please fill all mandatory fields *") end if end if if Request.Form("Prenom") <> "" and FieldWithDefaultOk("Jour", "NaissanceJour") and FieldWithDefaultOk("Mois", "NaissanceMois") and FieldWithDefaultOk("Année", "NaissanceAnnee") and Request.Form("CodeRegional") <> "" and Request.Form("Tel1") <> "" and Request.Form("Tel2") <> "" and Request.Form("clinique") <> "Choose" and Request.Form("Courriel") <> "" then Set Mailer = Server.CreateObject("CDONTS.NewMail") ' Variable ajoutée par Max Dim bodyMail ' Construire le contenu du mail bodyMail = bodyMail & "Client First and Last Names: " & Request.Form("Titre") & " " & Request.Form("Prenom") & " " & Request.Form("Nom") & vbCrLf & vbCrLf bodyMail = bodyMail & "Telephone: " & Request.Form("CodeRegional") & "-" & Request.Form("Tel1") & "-" & Request.Form("Tel2") & vbCrLf & vbCrLf bodyMail = bodyMail & "Email: " & Request.Form("Courriel") & vbCrLf & vbCrLf bodyMail = bodyMail & "Contact lens wearer: " & Request.Form("CLwearer") & vbCrLf & vbCrLf bodyMail = bodyMail & "Appointment request: " & Request.Form("RVannee") & "-" & Request.Form("RVmois") & "-" & Request.Form("Rvjour") & "-" & Request.Form("RVheure") & vbCrLf & vbCrLf bodyMail = bodyMail & "Remarks: " & Request.Form("remarques") & vbCrLf & vbCrLf Mailer.Body = bodyMail ' Envoyer le mail Mailer.From = Request.Form("Courriel") Mailer.To = "info@mountseymouroptometry.com" Mailer.Cc = Request.Form("Courriel") Mailer.Subject = "Appointment request - Mount Seymour Optometry Clinic " Mailer.Send %>

// Thank you for your appointment request. We will be in touch shortly to confirm the date and time. //

<% else %>
If you would like to email us to schedule an eye exam please fill out the form below. One of our representatives will contact you to confirm the appointment or to suggest another date and time. All the fields followed by a * are mandatory.
Title: 
First name*:  " /> <% if FieldOk("Prenom") = false then Response.Write("Enter your First name") end if %>
Last name*: " /> <% if FieldOk("Prenom") = false then Response.Write("Enter your Last name") end if %>
Daytime telephone*:  " /> " /> " /> <% if FieldOk("CodeRegional") = false or FieldOk("Tel1") = false or FieldOk("Tel2") = false then Response.Write("Telephone no. mandatory") end if %>
E-mail*:  " /> <% if FieldOk("Courriel") = false then Response.Write("E-mail mandatory") end if %>
(for confirmation email only, will not be given to a third party)
Are you a contact lens wearer: Yes /> No />
Date wanted:
Time wanted: 
Comments:
 
<% end if %>