For Adobe ColdFusion application servers Text

A text format field is the equivalent of <input type="text">, a simple box into which the visitor can type text. This text might be anything: a number, a price, a date, or a character string. If the TerraField attribute Prompt is specified, the value will appear in the empty field and disappear as soon as the field receives focus.

TerraForm recognises one special attribute for text format:

  • AutoAdvanceTo
    Optional. If you have maxlength set for this field, you can command TerraForm to move focus to the next field when this one is full. Set AutoAdvanceTo to the name of the next field. A good use for this is where several fields are used to collect the same piece of data, such as a credit card or social security number.

The form below shows examples of a plain field, a field with a default value, a field with regular HTML attributes specified, and a field with a prompt message that vanishes when the visitor clicks on the field. Note that many other TerraForm attributes can be specified, such as maxlength, required, and datatype.

Other non-TerraField attributes will be passed through to the underlying text tag (<input type="text">). For example:

  • onmousedown="this.style.backgroundColor='red'" onmouseup="this.style.backgroundColor='white'"
  • size="6"
  • title="(Optional)"

Examples

A plain text field:

<cf_terrafield
  name="MyTextField1"
  format="text"
/>

Assign a default value:

<cf_terrafield
  name="MyTextField2"
  format="text"
  default="All you need in this life is
  ignorance and confidence, and then
  success is sure."
/>

Regular attributes are passed through:

<cf_terrafield
  name="MyTextField3"
  format="text"
  size="6"
  style="background-color : #cccccc;"
/>

Add a prompt message:

<cf_terrafield
  name="MyTextField4"
  format="text"
  prompt="Your email address"
/>

HyperText Markup Language
The coding language used to create hypertext documents for use on the World Wide Web.
No comments yet