MACROMEDIA COLFUSION MX 7-CFML Reference page 691

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

Example
The following example checks whether a user has submitted a numeric ID and a valid email
address and phone number. If any of the submitted values does not meet the validation test, it
displays an error message.
<cfif isDefined("form.saveSubmit")>
<cfif isValid("integer", form.UserID) and isValid("email", form.emailAddr)
and isValid("telephone", form.phoneNo)>
<cfoutput>
<!--- Application code to update the database goes here --->
<h3>The email address and phone number for user #Form.UserID#
have been added</h3>
</cfoutput>
<cfelse>
<H3>You must supply a valid User ID, phone number, and email address.</H2>
</cfif>
<cfelse>
</cfif>
<cfform action="#CGI.SCRIPT_NAME#">
User ID:<cfinput type="Text" name="UserID"><br>
Phone: <cfinput type="Text" name="phoneNo"><br>
email: <cfinput type="Text" name="emailAddr"><br>
<cfinput type="submit" name="saveSubmit" value="Save Data"><br>
</cfform>
IsValid
691

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents