SebTags 1.0 Documentation: Custom Types

Custom Types

Several types of field customizations are available in cf_sebField. You can use built in custom types, create your own validation type, or create a completely custom type.

Built-In Custom Types

The built in custom types all use closing cf_sebField tags to take the custom content in between the tags.

The following "custom" types are built into cf_sebField:

Validation Types

You can also add your own custom validation types to cf_sebForm. To add validations to cf_sebForm, pass a structure of validations to the "validations" attribute of cf_sebForm. For example:

<cfset sValidations = StructNew()>
<cfset sValidations["YahooMail"] = "^['_a-z0-9-]+(\.['_a-z0-9-]+)*">
<cf_sebForm validations="#sValidations#">
    <cf_sebField type="text" name="fName" label="First Name" required="true">
    <cf_sebField type="text" name="lName" label="Last Name">
	<cf_sebField type="YahooMail" name="email" label="Yahoo! Email Address">
	<cf_sebField type="submit" label="Save">

Create Your Own Type

You can create your own cf_sebField type by creating a new file in the same folder as cf_sebField with a file name indicating the type.

The type of FCKeditor (sebField_FCKeditor.cfm) is included as an example of a custom type.