CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- 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
| __construct ($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
| __construct ($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 14 of file TextFormField.php.

## Constructor & Destructor Documentation

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

Object Constructor.

Parameters

  string | $Name | Internal name for this field, used in html.
  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 34 of file TextFormField.php.

## Member Function Documentation

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

Get or set the display length for this field.

Parameters

  int | $NewVal | New Length. (OPTIONAL)

Returns
  The current length

Definition at line 54 of file TextFormField.php.

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

Get or set the maximum input length for this field.

Parameters

  int | $NewVal | New max length. (OPTIONAL)

Returns
  The current max input length

Definition at line 64 of file TextFormField.php.

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

Generate HTML for this object.

Parameters

  bool | $DisplayErrorIndicator | Whether to display error indicator. (OPTIONAL)

Definition at line 78 of file TextFormField.php.

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

- objects/TextFormField.php