Field representation of an input field in HTML.

author Jorgen Evens
package WebLab
subpackage Form

 Methods

Constructs a new input field.

__construct(string $name, string $type, string $label, string $value, array $attributes) 

Parameters

$name

string

$type

string

$label

string

$value

string

$attributes

array

Retrieve the value of an attribute.

__get(string $attribute) : string
Inherited
inherited_from \WebLab_Form_Field::__get()

Parameters

$attribute

string

Returns

string

Check if an attribute has been set.

__isset(string $attribute) : boolean
Inherited
inherited_from \WebLab_Form_Field::__isset()

Parameters

$attribute

string

Returns

boolean

Set the value of an attribute.

__set(string $attribute, string $value) : \WebLab_Form_Field
Inherited
inherited_from \WebLab_Form_Field::__set()

Parameters

$attribute

string

$value

string

Returns

(non-PHPdoc)

__toString() : string

Add a validation filter

addFilter(\WebLab_Filter $filter, \unknown_type $errorMessage) 
Inherited
inherited_from \WebLab_Form_Field::addFilter()

Parameters

$filter

\WebLab_Filter

$errorMessage

\unknown_type

Shorthand for setAttribute and getAttribute

attr(string $name, string $value) : string
Inherited
inherited_from \WebLab_Form_Field::attr()

Parameters

$name

string

$value

string

Returns

string

Retrieve the value of an attribute.

getAttribute(string $attribute) : string
Inherited
inherited_from \WebLab_Form_Field::getAttribute()

Parameters

$attribute

string

Returns

string

Return the form to which this field belongs.

getForm() : \WebLab_Form
Inherited
inherited_from \WebLab_Form_Field::getForm()

Returns

Return the label of this field.

getLabel() : string
Inherited
inherited_from \WebLab_Form_Field::getLabel()

Returns

string

(non-PHPdoc)

getValue() : string
see \WebLab_Form_Field::getValue()

Returns

string

Determine if field is correct.

isValid() : boolean | array
Inherited
inherited_from \WebLab_Form_Field::isValid()

Returns

booleanarray

Set the value of an attribute.

setAttribute(string $attribute, string $value) : \WebLab_Form_Field
Inherited
inherited_from \WebLab_Form_Field::setAttribute()

Parameters

$attribute

string

$value

string

Returns

Set the to which this field belongs.

setForm(\WebLab_Form $form) : \WebLab_Form_Field
Inherited
inherited_from \WebLab_Form_Field::setForm()

Parameters

$form

\WebLab_Form

Returns

Set the label of this field.

setLabel(string $label) 
Inherited
inherited_from \WebLab_Form_Field::setLabel()

Parameters

$label

string

(non-PHPdoc)

setValue(string $value) : \WebLab_Form_Field
see \WebLab_Form_Field::setValue()

Parameters

$value

string

Set the value of a field to this.

Returns

(non-PHPdoc)

update() 

 Properties

 

$_attributes : array
Inherited
inherited_from \WebLab_Form_Field::$$_attributes
 

$_filters : array
Inherited
inherited_from \WebLab_Form_Field::$$_filters
 

$_form : \WebLab_Form
Inherited
inherited_from \WebLab_Form_Field::$$_form
 

$_label : string
Inherited
inherited_from \WebLab_Form_Field::$$_label