%
strThisPageMenuItem = "valuations"
%>
<%
'PAGE VARIABLES
strThisPageTitle = "Valuation Request"
strThisPageKeywords = strSEO_KeywordsIndex
strThisPageDescription = strSEO_DescriptionIndex
strThisPageStyles = "[tab_inputform_client.css]"
'**************
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")
sPropAddress1 = request.Form("txtPropAddress1")
sPropAddress2 = request.Form("txtPropAddress2")
SPropAddress3 = request.Form("txtPropAddress3")
sPropCity = request.Form("txtPropCity")
sPropPostCode = request.Form("txtPropPostCode")
sListingsType = request.Form("cbxListingType")
iBedrooms = request.Form("cbxBedrooms")
sOnMarket = Request.Form("cbxOnMarket")
if sOnMarket = "Yes" then
sOnMarketYes = "Selected"
else
sOnMarketNo = "Selected"
end if
'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(sPropAddress1) = 0 Then
bErrors = True
strErrorMsg_PropAddress1 = "This information is required"
End If
If fCheckLength(sPropAddress2) = 0 Then
bErrors = True
strErrorMsg_PropAddress2 = "This information is required"
End If
If fCheckLength(sPropAddress3) = 0 Then
bErrors = True
strErrorMsg_PropAddress3 = "This information is required"
End If
If fCheckLength(sPropCity) = 0 Then
bErrors = True
strErrorMsg_PropCity = "This information is required"
End If
If fCheckPostcode(sPropPostcode) = 0 Then
bErrors = True
strErrorMsg_PropPostCode = "This information is required"
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
sPropAddress = sPropAddress1
if Trim(sPropAddress2) <> "" Then sPropAddress = sPropAddress & "
" & sPropAddress2
if Trim(sPropAddress3) <> "" Then sPropAddress = sPropAddress & "
" & sPropAddress3
sPropAddress = sPropAddress & "
" & sCity
sPropAddress = sPropAddress & "
" & sPostCode
if iBedrooms = 0 then
sRooms = "Studio"
elseif iBedrooms = 5 then
sRooms = "5+"
else
sRooms = iBedrooms
end if
sSubject = "Valuation Request: " & sName
sBody = "A new valuation request has been submitted via your website. The details are:
"
sBody = sBody & "
| Property Address | " & sPropAddress & " |
|---|---|
| Type | " & sListingsType & " |
| Rooms | " & sRooms & " |
| On Market | " & sOnMarket & " |
| Name | " & sName & " |
|---|---|
| Address | " & sAddress & " |
| Home Tel | " & sHomeTel & " |
| Work Tel | " & sWorkTel & " |
| Mobile | " & sMobileTel & " |
| " & sEmail & " |
| Valuation Request | |
| Please fill out the following details to request a valuation of your property. | |
![]() |
|