UE 3 Stop Blank Fields
Using UE3 and ASP with VBScript
In spite of my advice a customer wants a large form emailed in which most of the fields will be blank. Is there a way to return a value in the email only if it is not blank?
See the code I tried below. It seems like everything is ignored after the first if statement
'Start Mail Body
if (cStr(Request.Form("Dealer_Name")) <>"") then
MailBody = MailBody & "Dealer Name: "
MailBody = MailBody & cStr(Request.Form("Dealer_Name"))
MailBody = MailBody & "<br /><br />" & vbCrlf & ""
end if
if (cStr(Request.Form("Dealer_Type")) <>"") then
MailBody = MailBody & "Dealer Type: "
MailBody = MailBody & cStr(Request.Form("Dealer_Type"))
MailBody = MailBody & "<br /><br />" & vbCrlf & ""
end if
'End Mail Body