Dashboard > FarCry 4.0 Developers Guide > Home > Formtools Technology > Form Tool Tag Properties
FarCry 4.0 Developers Guide
Form Tool Tag Properties
Added by Stephen Moretti , last edited by Blair McKenzie on Nov 23, 2007  (view change)
Labels: 
(None)

The form tool tags reside in the ./core/tags/formtools folder.
Import this tag library using

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

ft:form 

Properties 

Attribute Description
Default
Name Standard <form> name attribute
farcryForm#randrange(1,999999999)#
Target Target for form submission
 
Action Standard <form> action attribute
#cgi.SCRIPT_NAME#?#cgi.query_string#
Method
Standard <form> method attribute
post
onsubmit
Standard <form> onsubmit attribute
 
CSS Takes a comma delimited list of stylesheet names. 
These stylesheets must reside in the #application.url.webroot#/css/ folder.
 
Class
Standard <form> class attribute
 
Style
Standard <form> style attribute
 
Heading
If used, will display at the head of the form in a <h3> tag.
 
Validation Enables/Disables form validation
1
bAjaxSubmission Enables/Disables AJAX submission of form details
false

Description

ft:form is the wrapper for the display of the form for your object. 

Usage

<ft:form>
<ft:object stObject="#stObj#" lFields="Title,Description,supportType,StartDate,EndDate,aDocuments" format="edit" />
</ft:form>

Child tags

  • ft:object
  • ft:farcrybutton

ft:object

Properties 

Object Render attributes 

Attribute Description
ObjectID UUID of a record to be edited
stObject Struct of an object to be edited
typename Type name of an object to be edited

These properties are mutually exclusive. Use either ObjectID, stObject or typename.
stObject must contain the keys Typename and ObjectID

Field Rendering Properties 

Attribute Description
lFields List of fields to render
lExcludeFields List of fields to exclude from render
lHiddenFields List of fields to render as hidden fields that can be use to inject a value into the form post.

Display Properties

Attributes
Description
Default
ObjectLabel Used to group and label rendered object if required (form Legend)
 
class Class with which to set all farcry form tags  
style Style with which to set all farcry form tags  
Format Edit or Display - Fields are either editable or display only
edit
IncludeLabel Include label for field
1
<cfparam name="attributes.IncludeFieldSet" default="">
<cfparam name="attributes.IncludeBR" default="1">
<cfparam name="attributes.InTable" default="0">
<cfparam name="attributes.insidePLP" default="0"><!--- how are we rendering the form --->
<cfparam name="attributes.r_stFields" default=""><!--- the name of the structure that is to be returned with the form field information. --->
<cfparam name="attributes.stPropMetadata" default="#structNew()#"><!--- This is used to override the default metadata as setup in the type.cfc --->
<cfparam name="attributes.WizzardID" default=""><!--- If this object call is part of a wizzard, the object will be retrieved from the wizzard storage --->
<cfparam name="attributes.IncludeLibraryWrapper" default="true"><!--- If this is set to false, the library wrapper is not displayed. This is so that the library can change the inner html of the wrapper without duplicating the wrapping div. --->
<cfparam name="attributes.bValidation" default="true"><!--- Flag to determine if client side validation classes are added to this section of the form. --->
<cfparam name="attributes.stPropValues" default="#structNew()#">
<cfparam name="attributes.PackageType" default="types"><!--- Could be types or rules.. --->
<cfparam name="attributes.bIncludeSystemProperties" default="false"><!--- Allow system properties to be displayed.. --->
<cfparam name="attributes.lock" default="true"><!--- Lock if editing. --->
<cfparam name="attributes.bShowLibraryLink" default="true" type="boolean"><!--- Flag to determine if the libraryLink is to be displayed. --->

Description

Usage 

Child tags

ft:farcryButton

Properties 

Attributes 

Attribute Description
Default
Type Button or Submit
Submit
Value The text placed on the button and the name of the action that will be passed through to processing if the button is clicked.
#attributes.Type#
Onclick javascript called if the button is clicked
 
Class inline css class
 
Style inline css style
 
SelectedObjectID the value that will be placed in the submitted form field #form.selectedObjectID#. Usefull when selecting a record from a page with multiple objects
 
ConfirmText Text that will be placed in a javascript confirm dialog before submitting. Allowing the user to opt out if nessesary
 
validate Run any client side validation
true
src Source of an image. Uses the image as a submit button
 
url The url to redirect to if the button is clicked
 
target The target window to redirect to if a url is passed
_self
rbkey Allows the developer to specify the resource key to use for the label and confirmation text Generated automatically

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