cf_sebForm provides a simple interface to handle client-side validation and server-side validation. It can also handle simple CRUD interactions with a database or send email. Alternatively, it can call a specified component method after handling validation. The output of cf_sebForm can be skinned and/or customized.
Attribute |
Req/Opt |
Default |
Description |
---|---|---|---|
formname |
optional |
|
A name for the form. |
name |
optional |
|
Shortcut for the "formname" attribute. |
id |
optional |
|
The "id" attribute for the form. |
pkfield |
optional |
|
... |
recordid |
optional |
URL.id |
The value of the primary key field for the record being edited. If left blank or invalid, then cf_sebForm will add a new record on submission. |
forward |
required |
|
The url (absolute or relative) of the page that the user should be forwarded to upon completion of the form submission. |
action |
optional |
|
Name of ColdFusion page to execute when the form is submitted for processing. Use of this attribute will eliminate automatic server-side validation and processing by this tag. |
librarypath |
optional |
/lib/ |
The URL of the client-side script files. |
skin |
optional |
|
The skin used by cf_sebForm (from librarypath/skins). Current options are [carpediem,graybar,panels,plain]. You can also make your own skin (see below) |
skinpath |
optional |
#attributes.librarypath#skins/ |
The path to the CSS files for each skin. |
skins |
optional |
|
An optional structure to define any custom skins. Each key name should match the name of the skin being defined. Each key should be a structure defining attribute names with default values for the skin. |
format |
optional |
semantic |
Set format of form. If a format is provided by the skin, that will be used if set here. Config attribute will override format attribute.
|
objname |
optional |
jsqForm |
The name of the qforms object for this form. You must set this manually if you plan to have more than one cf_sebForm on the same page. |
config |
optional |
|
An optional structure that can be passed in to change the output by cf_sebForm. |
validations |
optional |
|
An optional structure to define any custom validations. Each key name should match the value of the "type" attribute used to indicate this type. The value of each key should be the regular expression to validate that type. |
enctype |
optional |
|
Sets the enctype attribute of the form tag. Note that you do not generally need to set this attribute as cf_sebForm will automatically set it to the correct value for a file upload if one is present. |
method |
optional |
post |
This is the same as the method attribute in a <form> tag.
|
target |
optional |
|
The target frame or window for the form submission. |
CatchErrTypes |
optional |
|
A list of error-types that should be caught by cf_sebForm as part of server-side validation. |
debug |
optional |
false |
Normally sebForm will suppress errors retrieving data for the form. Set debug=true to have it rethrow any errors retrieving data for the form. |
CFC_Component |
optional |
|
If provided with CFC_Method, the component to invoke instead of taking the default action of cf_sebForm. |
CFC_Method |
optional |
|
If provided with CFC_Component, the method to invoke instead of taking the default action of cf_sebForm. Each field will be passed in as an argument. cf_sebForm validation will still be used. |
CFC_MethodArgs |
optional |
|
If provided with CFC_Component and CFC_Method, arguments to supply to the CFC_Method method. |
CFC_GetMethod |
optional |
|
If provided with CFC_Component, the method to invoke instead of using the table or query attributes to get data for the table. |
CFC_DeleteMethod |
optional |
|
If provided with CFC_Component, the method to invoke for deletion instead of using sql deletion from the table. |
returnvar |
optional |
sebForm |
The name of a variables returned by sebForm with information about the form. |