Dashboard > FarCry 4.0 Developers Guide > Home > Custom Tag Libraries > Formtools Tags
Added by Blair McKenzie , last edited by Blair McKenzie on Nov 23, 2007  (view change)
Labels: 
(None)

<cfimport taglib="farcry.core.tags.formtools" prefix="ft" />

ft:form

Sets up a form so that it can be automatically processed with ft:processform.

Attribute Description Default
name Standard form attribute farcryForm#randomnumber#
target Standard form attribute None
action Standard form attribute None
method Standard form attribute POST
onsubmit Standard form attribute None
css By default the FarCry forms.css stylesheet is included. Set this to the name of a file in project css directory to override this. Empty
class Standard form attribute None
style Standard form attribute None
heading Form heading (added as H3) None
bAjaxSubmission Set to true to enable ajax submittion of form. WARNING: Requires access permission to FarCry webtop. false

ft:farcryButton

Creates a button that can trigger an ft:processform and functionality such as ft:form@bAjaxPermission.

Attribute Description Default
value The value to appear on the button. This is also the action detected by ft:processform. Translation is handled automatically required
confirmtext If specified, a confirmation alert containing this text is displayed when a user clicks on the button. Translation is handled automatically None
rbkey Allows developers to manually specify the resource key to use. "@label" will be appended for the value, and "@confirmtext" will be appended for confirmatin text. None

ft:object

Outputs a form based on the metadata of a specified type, rule, or form. Handling of this form data is done using ft:processform.

Atribute Description Default
typename The name of the type, rule, or form. If objectid and stObject aren't specified, the default property values are used. None. typename, objectid, or stObject is required
objectid The objectid of the item to use the form to edit with. None. typename, objectid, or stObject is required
stObject A property struct to use the form to edit with. Needs to have objectid and typename values None. typename, objectid, or stObject is required
lFields A list of fields to render. Defaults to all non-system. None
lExcludeFields A list of fields to exclude. Defaults to system None
stPropMetadata A property metadata struct in the form struct.property.propertyattribute. Values in this struct will override actaul metadata. None
bShowLibraryLink Set to false to disable the library link true

ft:processform

The contained code is only executed if the specified form has been submitted.

Attribute Description Default
action An 'action' is the value of the farcryButton. This value can be a list. Translation is handled autoamtically. All actions
excludeaction A list of actions to ignore. Translation is handled automatically. No actions
rbkey Allows developers to manually specify the resource key to use. Should be a list in the form "action1key,...,actionNkey,exclude1key,...,excludeNkey" None

ft:processformobjects

Pulls the data for a specific object out of the submitted form for processing. This is a loop tag, which means the contained code is run once for every submitted object.

By default, this tag will save the object once the containing code is complete. To stop this use the ft:processformobjects@bSessionOnly attribute or the ft:break tag.
Attribute Description Default
typename The type of object to process. typename, stObj, or objectid is required
objectid The objectid of the object to process. typename, stObj, or objectid is required
stPropMetadata A property metadata struct in the form struct.property.propertyattribute. Values in this struct will override actaul metadata. None
r_stProperties Properties of submitted object will be added to this variable for use in contained code. This struct is used when saving. stProperties
bSessionOnly Set to true to only save the object to session and not to the database. false

ft:break

This tag is only used inside ft:processformobjects. When executed it stops ft:processformobjects from saving the object.

ft:advice

This tag allows a developer to set a message on a specific object field. These messages are outputed automatically by ft:object.

This tag does not stop ft:processformobjects from saving the object.
Attribute Description Default
objectid The objectid of the associated object. During ft:processformobjects, all objects have an objectid property. required
field The name of the property required
message The message to set required
value The field value to use when input is rendered required
class The class to attach the message on output validation-advice (i.e. error)

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