Class formField

Description

Helper class for use in dbForm.

Located in Program_Root/formfields.inc (line 118)


	
			
Method Summary
class formField ([string $type = "hidden"], [string $name = null], [string $metaType = null], [array $attributes = null])
bool attributeExists (string $attribute)
void changeType ([string $type = "hidden"])
string displayField ()
mixed getAttribute (string $attribute)
void setAttributes (array $attributes)
Methods
Constructor formField (line 181)

Class constructor

Form field class handles storage and display of form field elements

  • access: public
class formField ([string $type = "hidden"], [string $name = null], [string $metaType = null], [array $attributes = null])
  • string $type: type Field type
  • string $name: name Name of the field
  • string $metaType: metaType Database metatype of the field
  • array $attributes: attributes Any field attributes
attributeExists (line 249)

Returns true or false if attribute is set

  • throws: E_USER_ERROR on validation errors
  • access: public
bool attributeExists (string $attribute)
  • string $attribute: attribute Name of the attribute to check
changeType (line 287)

Sets Form Attributes

As with creation of field it does not allow radio fields to be set

  • throws: E_USER_ERROR on validation errors
  • access: public
void changeType ([string $type = "hidden"])
  • string $type: type Type to change the field to.
displayField (line 328)

Displays the fields

Returns the html of the field

  • throws: E_USER_ERROR on validation errors
  • access: public
string displayField ()
getAttribute (line 265)

Gets Field Attribute

  • throws: E_USER_ERROR on validation errors
  • access: public
mixed getAttribute (string $attribute)
  • string $attribute: attribute Name of attribute to retrieve
setAttributes (line 229)

Sets Field Attributes

Sets any attributes of the form not already set. To make the resulting html xhtml complaint all attribute name are converted to lower case.

  • throws: E_USER_ERROR on validation errors
  • access: public
void setAttributes (array $attributes)
  • array $attributes: attributes Array of field attribute name value pairs

Documention generated on Sun, 14 Sep 2003 18:35:16 +1000 by phpDocumentor 1.2.1