Submit a blank field
Hi everyone,
I'm trying to use a cfif statement to check to see if users leave the email field in my form blank. See the code below. For some reason, if the user does enter an email address, the code works fine. If the field is left blank though, it seems that CF doesn't create the cfset with only the first and last names. Any suggestions? Is there a better way to check for an empty field?
Thanks!
<cfif '#Form.EmailAddress#' eq ''>
<cfset EmailFrom = '#Form.FirstName# #Form.LastName#'><cfelse>
<cfset EmailFrom = '#Form.FirstName# #Form.LastName#<#Form.EmailAddress#>'></cfif>