Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFSelect Required attribute....

Status
Not open for further replies.

BFreshour

Programmer
Mar 20, 2002
84
What am I doing wrong here? I thought since the first option had no value that they wouldn't be able to submit the form if it was selected, however, they can... Any tips?

Code:
<cfselect name=&quot;ClientID&quot; required=&quot;yes&quot; message=&quot;You must select your company!&quot;>
								<option></option>
							<cfoutput query=&quot;GetClients&quot;>
								<option value=&quot;#GetClients.ClientID#&quot;>#GetClients.ClientName#</option>
							</cfoutput>

</cfselect>
 
The code got misformatted... no real surprise there. Here it is cleaned up.

Code:
<cfselect name=&quot;ClientID&quot; required=&quot;yes&quot; message=&quot;You must select your company!&quot;>

     <option></option>

     <cfoutput query=&quot;GetClients&quot;>
     <option value=&quot;#GetClients.ClientID#&quot;>#GetClients.ClientName#</option>
     </cfoutput>

</cfselect>

I'm actually thinking that this isn't possible unless I use the &quot;MULTIPLE&quot; attribute in my CFSELECT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top