If Statements

hey i have a dynamic list/menu box with a list of states i also have created an option at the front so it’s blank at the start

i was wondering what an if statement would be to make it so they have to select something!

i have something like

<cfif Len(Trim(form.MemberPostCode)) LT 4>
 <p>ERROR! Post Code must have 4 digits!</p>
 <a href="javascript:history.back()">Back</a>
 <cfabort>
</cfif>

for just a text form field…but can’t seem to protect list/menu’s

any help would be great

thanks

Duck Miester

This should work.

<cfif form.states EQ “”>

ERROR! Please select a state!!!

Back