Dashboard > FarCry 4.0 Developers Guide > Home > Formtools Technology > Form Tool Property Metadata
FarCry 4.0 Developers Guide
Form Tool Property Metadata
Added by Geoff Bowers , last edited by Blair McKenzie on May 22, 2008  (view change)
Labels: 
(None)

Form Tools derive the bulk of their default behaviour from the metadata defined in the content type property tags.

Example Form Tool Metadata
<!--- 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.

Form Tool Data Types

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.

General Property Options

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.

General Formtool Property Options

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. n/a
fthelpsection Section text for inline help related to fieldsset. n/a
ftvalidation A comma separated list of validation requirements. n/a
ftDefaultType Options

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.

If you're playing around with these and want to see changes on the fly, without having to update the application scope (by appending ?updateApp=1) to the URL, make sure you checkout ./yourproject/config/_serverSpecificRequestScope.cfm and add the domain you're developing on, so that it refreshes your changes on the fly. Makes development much quicker!

Powered by a free Atlassian Confluence Open Source Project License granted to FarCry CMS. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators