CWIS Developer Documentation
List of all members
TextFormField Class Reference

Generator for text input fields. More...

Inheritance diagram for TextFormField:
Inheritance graph
[legend]
Collaboration diagram for TextFormField:
Collaboration graph
[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$NameInternal name for this field, used in html.
bool$IsRequiredWhether or not the field is required.
string$LabelDisplay name for this field, shown to user.
int$LengthLength of the display box.
int$MaxLengthThe maximum allowed entry size.
callback$ValidFuncA function to check this field for valid input. (OPTIONAL)
array$ValidMsgsAn 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$NewValNew 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$NewValNew 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$DisplayErrorIndicatorWhether to display error indicator. (OPTIONAL)

Definition at line 78 of file TextFormField.php.


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