Hello!
I want to force folks to select a state but I'm using CFSELECT and the
required tag doesn't work with it. Consequently I'm attempting to
modify the CFIF statement on my action page with little success. I've
tried this:
<CFIF IsDefined("State") IS "No">
Error! You must select a state!
<CFABORT>
</CFIF>
but it doesn't work. The ultimate goal is to require folks to select at
MINIMUM a state in this search and give them an error if they select
nothing. I know I'm making a stupid mistake and and any help would be
very appreciated!!!
Thank you,
-Laura
An Apparent Newbie!
-- My Action page in progress--
<CFQUERY DATASOURCE="lcn" NAME="Contacts">
SELECT Zip, City, County, State, Business, Phone, Fax, Website, Email,
Street1, Legal, Comments
FROM Contacts
WHERE Legal LIKE '1'
<CFIF Business IS NOT "">
AND Business LIKE '#Business#%'
</CFIF>
<CFIF City IS NOT "">
AND City LIKE '#City#%'
</CFIF>
<CFIF County IS NOT "">
AND County LIKE '#County#%'
</CFIF>
<CFIF Zip IS NOT "">
AND Zip LIKE '#Zip#%'
</CFIF>
<CFIF State IS "">
AND State LIKE '#State#%'
</CFIF>
ORDER BY Business
</CFQUERY>
<HTML>
<HEAD>
<TITLE>Search Results</TITLE>
</HEAD>
<body BGCOLOR="white">
<P><CENTER>
<FONT FACE=ARIAL SIZE=+1>
<CFOUTPUT>Found #Contacts.RecordCount# Matches</CFOUTPUT>
</font></CENTER>
<P>
<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=0 WIDTH=90% ALIGN=CENTER>
<CFOUTPUT QUERY="Contacts">
<TR>
<TD VALIGN=TOP><FONT FACE=Arial SIZE=-1>
<b>#Business#</b></FONT><BR>
<FONT FACE=Arial SIZE=-1>#Street1#<CFIF Len(Trim(Street1)) IS
0>N/A</CFIF><BR>
#City#, #State# #Zip#<BR>
PH: #Phone#<CFIF Len(Trim(Phone)) IS 0>N/A</CFIF><BR>
FX: #Fax#<CFIF Len(Trim(Fax)) IS 0>N/A</CFIF><BR>
Web: #Website#<CFIF Len(Trim(Website)) IS 0>N/A</CFIF><BR>
Email: <A HREF="mailto:#Email#">#Email#</a><CFIF Len(Trim(Email)) IS
0>N/A</CFIF>
</FONT></TD><TD VALIGN=TOP><FONT FACE=Arial
SIZE=-1><i>#Comments#</i></FONT><BR></td>
</TR>
</CFOUTPUT>
</TABLE>
</P>
</BODY>
</HTML>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.