
March 2nd, 2005, 01:18 AM
|
 |
Wickedwd.com
|
|
Join Date: May 2004
Location: wickedwd.com
Posts: 186
Time spent in forums: 17 h 22 m 55 sec
Reputation Power: 0
|
|
|
Form Validation - CF 7
Im having a noob problem with cf 7
I made a registration form, but now i want to check if the username the person chose is already taken. In cf 6 i would write <cfif CheckDuplicate.RecordCount GTE 1> and i would write a query with a WHERE = #FORM.Username#
Those were the good days...now FORM seems not to work cf is now using bind and {Username.text} good to output the info but not to validate stuff.
Argh any help is appreciated.
PS. this is those new nifty flash forms that take a decade to load just in case heres my code.
Code:
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<cfform format="flash" skin="haloblue" width="500">
<cfformgroup type="tabnavigator">
<cfformgroup type="page" label="Personal Details">
<cfformgroup type="horizontal">
<cfinput name="FirstName" type="text" label="First Name" width="60">
<cfinput name="LastName" type="text" label="Last Name" width="60">
<cfselect name="Gender" label="Gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</cfselect>
</cfformgroup>
</cfformgroup>
<cfformgroup type="page" label="Age">
<cfformgroup type="horizontal" label="Age next birthday">
<cfinput name="Age" type="radio" label="18-30" value="18-30">
<cfinput name="Age" type="radio" label="31-40" value="31-40">
<cfinput name="Age" type="radio" label="41 and over" value="41 and over">
<cfinput name="Age" type="radio" label="Just give me jojo" value="Just give me jojo">
</cfformgroup>
</cfformgroup>
<cfformgroup type="page" label="Contact Details">
<cfformgroup type="horizontal">
<cfinput name="eMail" type="text" label="Email" validate="email" required="yes" value="bobert">
<cfinput name="telephone" type="text" label="Telephone" validate="telephone" required="yes" value="enter here">
<cfinput name="FaxNumber" type="text" label="Fax" validate="telephone" required="yes">
</cfformgroup>
</cfformgroup>
<cfformgroup type="page" label="Done">
<cfformgroup type="horizontal">
<cfformitem type="text" name="FirstName" bind="Name: {FirstName.text}"></cfformitem>
<cfformitem type="text" name="LastName" bind="{LastName.text}" style="text-align: left;"></cfformitem>
<cfformitem type="text" name="Gender" bind="Gender: {Gender.text}"></cfformitem>
</cfformgroup>
<cfformgroup type="horizontal">
<cfformitem type="text" name="Age" bind="Preferred Partner: {Age.selectedData}"></cfformitem>
</cfformgroup>
<cfformgroup type="horizontal">
<cfformitem type="text" name="eMail" bind="eMail: {eMail.text}"></cfformitem>
</cfformgroup>
<cfformgroup type="horizontal">
<cfformitem type="text" name="telephone" bind="Tel No: {telephone.text}"></cfformitem>
<cfformitem type="text" name="FaxNumber" bind="Fax No: {FaxNumber.text}"></cfformitem>
</cfformgroup>
<cfinput type="submit" name="submit" value="Submit">
</cfformgroup>
</cfformgroup>
</cfform>
</body>
</html>
|