field

The field object describes a single interactive container capable of capturing and presenting data content.

In terms of objects available in the Object Library of Designer, the field object is the base XML definition for the following objects:

  • Barcodes

  • Button

  • Date/Time Field

  • Decimal Field

  • Signature Field

  • Email Submit Button

  • HTTP Submit Button

  • Image Field

  • Numeric Field

  • Paper Forms Barcode

  • Password Field

  • Print Button

  • Reset Button

  • Text Field

You can define custom validation messages. A single field can contain up to three messages, one each for script test, picture test, and null test. When these are specified, they can be accessed with the following syntax:

field.validate.message.scriptTest.value 
field.validate.message.formatTest.value 
field.validate.message.nullTest.value

You can also access these validation messages with their shortcut properties:

field.validationMessage 
field.formatMessage 
field.mandatoryMessage

When these values are not populated, the processor constructs a default message.

A field can have a maximum of one validation test in a failure state at any given time. Validation tests are evaluated in the following order, and evaluation stops at the first test that fails:

  1. nullTest

  2. formatTest

  3. scriptTest

Parent class

container class

Properties

Name

Description

Type

Access

{default}

Represents the actual value stored by an object.

Varies

Read /Write

access

Controls user access to the contents of a container object, such as a subform.

String

Read /Write

accessKey

Specifies an accelerator key that is used by an interactive application to move the input focus to a particular field element.

String

Read /Write

anchorType

Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.

String

Read /Write

borderColor

Specifies the border color value for this field.

String

Read /Write

borderWidth

Specifies the border width for this field.

String

Read /Write

colSpan

Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.

String

Read /Write

editValue

Specifies the edit value for the field.

String

Read /Write

errorText

Returns the validation message for the first failed validation test, or an empty string if this field has passed all validation tests.

String

Read

fillColor

The background color value for this field.

String

Read /Write

fontColor

Specifies the foreground color value for the field. It is the equivalent of the font.fill.color.valueexpression.

String

Read /Write

formatMessage

Specifies the format validation message string for this field.

String

Read /Write

formattedValue

Specifies the formatted value for the field.

String

Read /Write

h

A measurement of the height for the layout.

String

Read /Write

hAlign

Specifies the horizontal text alignment.

String

Read /Write

length

Specifies the number of objects in the list.

Integer

Read

locale

Specifies the language, currency, and time/date formatting to use for the content of the object.

String

Read /Write

mandatory

Specifies the nullTest value for the field.

String

Read /Write

mandatoryMessage

Specifies the mandatory message string for this field.

String

Read /Write

maxH

Specifies the maximum height for layout purposes.

String

Read /Write

maxW

Specifies the maximum width for layout purposes.

String

Read /Write

minH

Specifies the minimum height for layout purposes.

String

Read /Write

minW

Specifies the minimum width for layout purposes.

String

Read /Write

parentSubform

Specifies the parent subform (page) of this field.

Object

Read

presence

Specifies an object’s visibility.

String

Read /Write

rawValue

Specifies the unformatted value of the current object.

Varies

Read /Write

relevant

Controls whether a form object is included when the form is printed.

String

Read /Write

rotate

Rotates the object around its anchor point by the specified angle.

String

Read /Write

selectedIndex

The index of the first selected item.

Integer

Read /Write

use

Invokes a prototype.

String

Read /Write

usehref

Invokes an external prototype.

String

Read /Write

validationMessage

Specifies the validate message string for this field.

String

Read /Write

vAlign

Specifies the vertical text alignment.

String

Read /Write

w

A measurement specifying the width for the layout.

String

Read /Write

x

Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.

String

Read /Write

y

Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.

String

Read /Write

Methods

Name

Description

Returns

addItem

Adds new items to the current form field. For example, this method adds new items to a drop-down list.

Empty

boundItem

Gets the bound value of a specific display item of a drop-down list or list box.

String

clearItems

Removes all the items from the field. For example, it removes all the items contained within a drop-down list or a list box.

Empty

deleteItem

Deletes the specified item.

Boolean

execCalculate

Executes any scripts on the calculate event of the specified object, and any child objects.

Empty

execEvent

Executes the event script of the object.

Empty

execInitialize

Executes any scripts on the initialize event of the specified object, and any child objects.

Empty

execValidate

Executes any scripts on the validate event of the specified object, and any child objects.

Empty

getDisplayItem

Retrieves the item display text for the specified item index.

String

getItemState

Returns the selection state of the specified item.

Boolean

getSaveItem

Retrieves the data value for the specified item index.

String

setItemState

Sets the selection state of the specified item.

Empty

setItems

Adds new items and values to the current form field. For example, this method adds new items and values as arguments to a drop-down list.

Empty

// Ethnio survey code removed