Form Tools derive the bulk of their default behaviour from the metadata defined in the content type property tags.
<!--- General Contact Details ---> <cfproperty name="firstname" type="string" hint="First name." required="no" default="" ftlabel="Firstname" /> <cfproperty name="lastname" type="string" hint="Last name." required="no" default="" ftvalidation="required" ftlabel="Lastname" /> <cfproperty name="Position" type="string" hint="Job title, position." required="no" default="" ftlabel="Position" /> |
All form tool metadata is extended <cfproperty> metadata. The specific attributes are all prefixed by ft, for example ftlabel.
fttype can be used with the following options:
These components can be found at core.packages.formtools |
These form tool options can be extended or supplemented from the FarCry project code base.
Attribute |
Description |
Value |
---|---|---|
blabel |
Boolean; true/false. Maps this property to the types.label property. |
In the absence of any blabel metadata it will look for substitute property; title, name or properties containing the string name. |
bSave |
Boolean; true/false. Determines if property should be saved to the database on setData(). Useful for custom properties that you may want to be handled external to FarCry, such as ident fields |
True; default. |
Attribute |
Description |
Value |
---|---|---|
ftlabel |
Text label for the form element |
Defaults to property name if absent. |
ftshowlabel |
Flag to show/hide text label for the form element |
Defaults to true. |
ftSeq |
Numeric value for form field display order |
No default value. |
ftFieldset |
Text used as a title to group a set of fields. |
No default value. |
ftWizardStep |
Allows you to create multi-step forms. Set to the title of the step as you would ftFieldset |
No Default Value. |
ftstyle |
Inline style to apply to form element. |
No default value. |
ftclass |
Class to apply to form element. |
No default value. |
ftDisplayOnly |
Boolean that prevents the field from being editable. |
False |
ftDefault |
Default form field value |
No default value. |
ftDefaultType |
The type of default value; value, expression or evaluate. |
Defaults to value. |
fthelptitle |
Title of a fieldset related inline help. Only works on the first property in a fieldset. |
n/a |
fthelpsection |
Section text for inline help related to fieldsset. Only works on the first property in a fieldset. |
n/a |
A comma separated list of validation requirements. |
n/a |
|
fthint |
A small inline hint that appears below the field to assist users. |
n/a |
ftEditMethod |
Specify a function name. |
Defaults to ftEdit<propertyName> |
Examples of default type usage. For todays date, use ftdefault="now()" ftdefaulttype="evaluate" and you'll get the result of Evaluate(now()) Expression does this Evaluate(DE(yourvalue)) – no good example springs to mind. |
Note: If the attributes ftSeq and ftFieldset are not used all properties will be displayed in the form. If ftSeq and ftFieldset are used only those fields with these attributes will be displayed in the form. This allows you show only the properties that want visible on your generated form.