%
strThisPageMenuItem = "register"
%>
<%
'PAGE VARIABLES
'**************
If Request.ServerVariables("CONTENT_LENGTH") > 0 Then
'Validate Form
sTitle = request.Form("cbxTitle")
sFirstname = request.Form("txtFirstname")
sSurname = request.Form("txtSurname")
sAddress1 = request.Form("txtAddress1")
sAddress2 = request.Form("txtAddress2")
SAddress3 = request.Form("txtAddress3")
sCity = request.Form("txtCity")
sPostCode = request.Form("txtPostCode")
sHomeTel = request.Form("txtHomeTel")
sWorkTel = request.Form("txtWorkTel")
sMobileTel = request.Form("txtMobileTel")
sEmail = request.Form("txtEmail")
sCustType = request.Form("cbxCustType")
sCustType1 = ""
sCustType2 = ""
Select Case sCustType
Case "Buying" : sCustType1 = "Selected"
Case "Renting" : sCustType2 = "Selected"
end select
sPriceFrom = request.Form("txtPriceFrom")
sPriceTo = request.Form("txtPriceTo")
iBedrooms = request.Form("cbxBedrooms")
sArea = request.Form("txtAreas")
sStatus = request.Form("cbxStatus")
sStatus1 = ""
sStatus2 = ""
sStatus3 = ""
sStatus4 = ""
sStatus5 = ""
sStatus6 = ""
sStatus7 = ""
sStatus8 = ""
Select Case sStatus
Case "1st Time Buyer" : sStatus1 = "Selected"
Case "Own to Sell" : sStatus2 = "Selected"
Case "On Market" : sStatus3 = "Selected"
Case "Own Sold" : sStatus4 = "Selected"
Case "Under Offer" : sStatus5 = "Selected"
Case "Cash Buyer" : sStatus6 = "Selected"
Case "Buy to Let" : sStatus7 = "Selected"
Case "Non-Dependent" : sStatus8 = "Selected"
end select
sValuation = Request.Form("cbxValuation")
if sValuation = "Yes" then
sValuationYes = "Selected"
else
sValuationNo = "Selected"
end if
sInfo = request.Form("txtInfo")
'validate
bErrors = False
strErrorMsg_Main = "There were errors with your submission. Please correct the problems below and try again.
"
If fCheckLength(sFirstname) = 0 Then
bErrors = True
strErrorMsg_Firstname = "This information is required"
End If
If fCheckLength(sSurname) = 0 Then
bErrors = True
strErrorMsg_Surname = "This information is required"
End If
If fCheckLength(sAddress1) = 0 Then
bErrors = True
strErrorMsg_Address1 = "This information is required"
End If
If fCheckLength(sAddress2) = 0 Then
bErrors = True
strErrorMsg_Address2 = "This information is required"
End If
If fCheckLength(sAddress3) = 0 Then
bErrors = True
strErrorMsg_Address3 = "This information is required"
End If
If fCheckLength(sCity) = 0 Then
bErrors = True
strErrorMsg_City = "This information is required"
End If
If fCheckPostcode(sPostcode) = 0 Then
bErrors = True
strErrorMsg_PostCode = "This information is required"
End If
If fCheckLength(sMobileTel) = 0 Then
bErrors = True
strErrorMsg_MobileTel = "This information is required"
End If
If fCheckLength(sEmail) = 0 Then
bErrors = True
strErrorMsg_Email = "This information is required"
End If
If fCheckLength(sPriceFrom) = 0 Then
bErrors = True
strErrorMsg_PriceFrom = "This information is required"
elseif not fCheckRegExp(sPriceFrom, "^[\d]+[\.[0-9]*]*$") then
bErrors = True
strErrorMsg_PriceFrom = "Please enter a valid currency value here"
End If
If fCheckLength(sPriceTo) = 0 Then
bErrors = True
strErrorMsg_PriceTo = "This information is required"
elseif not fCheckRegExp(sPriceTo, "^[\d]+[\.[0-9]*]*$") then
bErrors = True
strErrorMsg_PriceTo = "Please enter a valid currency value here"
End If
' If fCheckRegExp(sListingType, "^[SALE|RENT]+$") = False Then
' bErrors = True
' strErrorMsg_ListingType = "This information is required"
' End If
' If fCheckRegExp(iBedrooms, "^[0-9]+$") = False Then
' bErrors = True
' strErrorMsg_Bedrooms = "This information is required"
' End If
'Send Email
If bErrors = False Then
sName = sTitle & " " & sFirstname & " " & sSurname
sAddress = sAddress1
if Trim(sAddress2) <> "" Then sAddress = sAddress & "
" & sAddress2
if Trim(sAddress3) <> "" Then sAddress = sAddress & "
" & sAddress3
sAddress = sAddress & "
" & sCity
sAddress = sAddress & "
" & sPostCode
if iBedrooms = 0 then
sRooms = "Studio"
elseif iBedrooms = 5 then
sRooms = "5+"
else
sRooms = iBedrooms
end if
sSubject = "Registration Request: " & sName
sBody = "A new registration request has been submitted via your website. The details are:
"
sBody = sBody & "
| Name | " & sName & " |
|---|---|
| Address | " & sAddress & " |
| Home Tel | " & sHomeTel & " |
| Work Tel | " & sWorkTel & " |
| Mobile | " & sMobileTel & " |
| " & sEmail & " |
| Buying or Renting? | " & sCustType & " |
|---|---|
| Price From: � | " & sPriceFrom & " |
| Price To: � | " & sPriceTo & " |
| No Of Bedrooms | " & sRooms & " |
| Areas Interested in | " & replace(sArea, chr(10), " ") & " |
| Status | " & sStatus & " |
|---|---|
| Valuation Required? | " & sValuation & " |
| Register | |
| Please fill out the following details to register your details with Wilkinson Byrne | |
![]() |
|