metaHTML

# Class: htmlInputField

Source Location: /lib/html.inc

### Class Overview

    htmlElement
       |
       --htmlInputField

A standard input field.

### Variables

- $required

### Methods

- __construct
- generateHTML
- setFieldMaxLength
- setFieldSize
- setIsEnabled
- setIsPassword
- setObfuscate
- setRequired
- setValidationRule

### Child classes:

htmlTableExtendedInputField
  An extended input field that combines label, input field and help.

### Inherited Constants

#### Class: htmlElement

htmlElement::ALIGN_BOTTOM
htmlElement::ALIGN_CENTER
htmlElement::ALIGN_LEFT
htmlElement::ALIGN_RIGHT
htmlElement::ALIGN_TOP
htmlElement::VALIDATE_NUMERIC

### Inherited Variables

#### Class: htmlElement

htmlElement::$alignment
htmlElement::$colspan
htmlElement::$rowspan

### Inherited Methods

#### Class: htmlElement

htmlElement::generateHTML()
  Prints the HTML code for this element.
htmlElement::getAlignmentString()
  Returns the HTML attributes for the alignment.
htmlElement::getColspanString()
  Returns the HTML attribute for the colspan.
htmlElement::getRowspanString()
  Returns the HTML attribute for the rowspan.

### Class Details

[line 344]
A standard input field.
[ Top ]

### Class Variables

#### $required = false

[line 361]

required field

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 371]

`htmlInputField __construct( String $fieldName, [String $fieldValue = null], [ $fieldSize = null])`

Constructor

Overridden in child classes as:

htmlTableExtendedInputField::__construct()
  Constructor

#### Parameters:

String | $fieldName | unique field name
String | $fieldValue | value of input field (optional)
| $fieldSize |

[ Top ]

### method generateHTML [line 393]

`array generateHTML( string $module, array $input, array $values, boolean $restricted, &$tabindex, string $scope, integer $tabindex)`

Prints the HTML code for this element.

#### Tags:

return: | List of input field names and their type (name => type)

Overridden in child classes as:

htmlTableExtendedInputField::generateHTML()
  Prints the HTML code for this element.

Overrides htmlElement::generateHTML() (Prints the HTML code for this element.)

#### Parameters:

string | $module | Name of account module
array | $input | List of meta-HTML elements
array | $values | List of values which override the defaults in $input (name => value)
boolean | $restricted | If true then no buttons will be displayed
integer | $tabindex | Start value of tabulator index for input fields
string | $scope | Account type
| &$tabindex |

[ Top ]

### method setFieldMaxLength [line 449]

`void setFieldMaxLength( int $fieldMaxLength)`

Sets the maximum field length.

#### Tags:

access: | public

#### Parameters:

int | $fieldMaxLength | length

[ Top ]

### method setFieldSize [line 458]

`void setFieldSize( int $fieldSize)`

Sets the field size.

#### Tags:

access: | public

#### Parameters:

int | $fieldSize | size

[ Top ]

### method setIsEnabled [line 476]

`void setIsEnabled( boolean $isEnabled)`

Specifies if this component is enabled and accepts user modification.

#### Tags:

access: | public

#### Parameters:

boolean | $isEnabled | enabled if true

[ Top ]

### method setIsPassword [line 467]

`void setIsPassword( boolean $isPassword)`

Specifies if this is a password field.

#### Tags:

access: | public

#### Parameters:

boolean | $isPassword | password field

[ Top ]

### method setObfuscate [line 485]

`void setObfuscate( boolean $obfuscate)`

Specifies if the value should be saved in obfuscated form (e.g. self service profile).

#### Tags:

access: | public

#### Parameters:

boolean | $obfuscate | obfuscate value

[ Top ]

### method setRequired [line 494]

`void setRequired( boolean $required)`

Specifies if the input field is required.

#### Tags:

access: | public

#### Parameters:

boolean | $required | required

[ Top ]

### method setValidationRule [line 504]

`void setValidationRule( boolean $rule)`

Specifies the validation rule (e.g. htmlElement::VALIDATE_NUMERIC) for this field.

This rule is checked on client side when the input field looses focus.

#### Tags:

access: | public

#### Parameters:

boolean | $rule | rule name

[ Top ]

Documentation generated on Tue, 22 Nov 2011 16:29:48 +0100 by phpDocumentor 1.4.1