CWIS Developer Documentation

- Home
- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members
TextFormField Class Reference

Generator for text input fields. More...

Inheritance diagram for TextFormField:
[legend]
Collaboration diagram for TextFormField:
[legend]

## Setup/Initialization
| TextFormField ($Name, $IsRequired, $Label, $Length, $MaxLength, $ValidFunc=NULL, $ValidMsgs=NULL)
| Object Constructor. More...

## Accessors
| Length ($NewVal=NULL)
| Get or set the display length for this field. More...
| MaxLength ($NewVal=NULL)
| Get or set the maximum input length for this field. More...

## Display
| PrintInput ($DisplayErrorIndicator=FALSE)
| Generate HTML for this object. More...

## Additional Inherited Members
Public Member Functions inherited from FormField
| FormField ($Name, $IsRequired, $Label, $ValidFunc, $ValidMsgs)
| Object Constructor. More...
| Name ($NewVal=NULL)
| Get or set the name. More...
| IsRequired ($NewVal=NULL)
| Get/set IsRequired. More...
| Label ($NewVal=NULL)
| Get or set the form field label as shown to the user. More...
| Value ($NewVal=NULL)
| Get or set the form field value. More...
| IsPassword ()
| Determine if this form field is a password form field. More...
| PrintField ($DisplayErrorIndicator=FALSE)
| Print the form field label and generate input tags for this form field. More...
| PrintLabel ($DisplayErrorIndicator=FALSE)
| Print the label for this form field without generating the input tags. More...
| IsInvalidValue ($Value)
| Check the validity of the form field's value. More...
| GetInvalidValueMessage ($ErrorCode)
| Map an error code from IsInvalidValue to an error message. More...
Protected Attributes inherited from FormField
| $MyName
| $MyIsRequired
| $MyLabel
| $MyValue
| $MyValidFunc
| $MyValidMsgs

## Detailed Description

Generator for text input fields.

Definition at line 15 of file TextFormField.php.

## Member Function Documentation

TextFormField::Length | ( |  | $NewVal = `NULL` | ) |

Get or set the display length for this field.

Parameters

  int | $NewVal | (OPTIONAL)

Returns
  The current length

Definition at line 53 of file TextFormField.php.

TextFormField::MaxLength | ( |  | $NewVal = `NULL` | ) |

Get or set the maximum input length for this field.

Parameters

  int | $NewVal | (OPTIONAL)

Returns
  The current max input length

Definition at line 60 of file TextFormField.php.

TextFormField::PrintInput | ( |  | $DisplayErrorIndicator = `FALSE` | ) |

Generate HTML for this object.

Parameters

  bool | $DisplayErrorIndicator | (OPTIONAL)

Definition at line 71 of file TextFormField.php.

TextFormField::TextFormField | ( |  | $Name,
|  |  | $IsRequired,
|  |  | $Label,
|  |  | $Length,
|  |  | $MaxLength,
|  |  | $ValidFunc = `NULL`,
|  |  | $ValidMsgs = `NULL`
| ) |  |

Object Constructor.

Parameters

  string | $Name | internal name for this field, used in html id=
  bool | $IsRequired | whether or not the field is required
  string | $Label | display name for this field, shown to user
  int | $Length | Length of the display box
  int | $MaxLength | The maximum allowed entry size
  callback | $ValidFunc | A function to check this field for valid input (OPTIONAL)
  array | $ValidMsgs | An array of error messages which should correspond to the error codes issued by ValidFunc (OPTIONAL)

Definition at line 33 of file TextFormField.php.

References FormField\FormField().

Referenced by PasswordFormField\PasswordFormField().

Here is the caller graph for this function:

The documentation for this class was generated from the following file:

- objects/TextFormField.php