Class form_textfield

Description

Text Field class. This class generates a text field.

Located in /form-defs.php (line 1004)

RenderableObject
   |
   --StylableObject
      |
      --HTMLObject
         |
         --form_field
            |
            --form_textfield
Direct descendents
Class Description
 class form_displayonlyfield Displayonly Field class Extends the textfield class. This class renders a textfield as text rather than a textbox control. The form value is still submitted, but as a hidden field in the form..
 class form_passwordfield Password Field class Password field element. Same as textfield, but masks user input.
 class form_combofield Combo Field class A field for producing combo boxes (dropdown select menus) or multi-line list-boxes, either of which may be single-select or multiple select.
 class form_memofield Memo Field class A field which renders a textarea form element. These are used to allow people to input large tracts of text by typing or copy/paste.
 class form_imagefield Image Field class This is a hybrid field. It is basically a text field where the value is expected to be the location of an image, either a real path to a file or a URI.
 class form_tandemfield Tandem Field class
Variable Summary
 mixed $format
 mixed $maxlength
Method Summary
 form_textfield form_textfield ([string $name = ""], [string $label = ""], [string $value = ""], [boolean $editable = EDITABLE], [string $css = ""], [integer $width = STD_WIDTH])
 string html ([mixed $name = ""])
 void set_format (string $format)
 void set_width (integer $width, [integer $maxlength = false])
 string wml ([mixed $name = ""])
Variables
Methods
Constructor form_textfield (line 1022)

Constructor Create a field object. Sets basic field attributes.

form_textfield form_textfield ([string $name = ""], [string $label = ""], [string $value = ""], [boolean $editable = EDITABLE], [string $css = ""], [integer $width = STD_WIDTH])
  • string $name: The name of the field
  • string $label: The label which can be displayed alongside the field
  • string $value: The value of the field
  • boolean $editable: Editability: EDITABLE or DISPLAY_ONLY (true or false)
  • string $css: CSS class or style to apply to the button
  • integer $width: Width of element in characters
html (line 1073)

This renders the field as HTML.

  • return: The field as HTML.
string html ([mixed $name = ""])

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.

Redefined in descendants as:
set_format (line 1045)

Set field format (WML)

void set_format (string $format)
  • string $format: WML format specifier.
set_width (line 1034)

Set the field width (usually in characters).

void set_width (integer $width, [integer $maxlength = false])
  • integer $width: Width of element in characters
  • integer $maxlength: Maximum no. of characters in field

Redefined in descendants as:
  • form_combofield::set_width() : Set select field width. Note that selects can only have width set using a style, since they normally auto-set the width to the max length of their options display strings.
wml (line 1053)

This renders the field as WML.

  • return: The field as WML.
string wml ([mixed $name = ""])

Redefinition of:
RenderableObject::wml()
Return output suitable for normal wap-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to wap devices.

Redefined in descendants as:

Inherited Methods

Inherited From form_field

 form_field::form_field()
 form_field::as_displayonly()
 form_field::as_hiddenfield()
 form_field::disable_autocomplete()
 form_field::setlabel()
 form_field::setvalue()
 form_field::set_displayonly()

Inherited From HTMLObject

 HTMLObject::HTMLObject()
 HTMLObject::inherit_attributes()
 HTMLObject::setaccesskey()
 HTMLObject::setalign()
 HTMLObject::setalt()
 HTMLObject::setbackground()
 HTMLObject::setbgcolor()
 HTMLObject::setborder()
 HTMLObject::setcolor()
 HTMLObject::setheight()
 HTMLObject::sethspace()
 HTMLObject::setlang()
 HTMLObject::setlangdir()
 HTMLObject::setname()
 HTMLObject::setsize()
 HTMLObject::setsrc()
 HTMLObject::settabindex()
 HTMLObject::settarget()
 HTMLObject::settitle()
 HTMLObject::setvalign()
 HTMLObject::setvspace()
 HTMLObject::setwidth()
 HTMLObject::set_attribute()
 HTMLObject::set_linkover_text()
 HTMLObject::set_onblur()
 HTMLObject::set_onchange()
 HTMLObject::set_onclick()
 HTMLObject::set_ondblclick()
 HTMLObject::set_onfocus()
 HTMLObject::set_onkeydown()
 HTMLObject::set_onkeypress()
 HTMLObject::set_onkeyup()
 HTMLObject::set_onload()
 HTMLObject::set_onmousedown()
 HTMLObject::set_onmousemove()
 HTMLObject::set_onmouseout()
 HTMLObject::set_onmouseover()
 HTMLObject::set_onmouseup()
 HTMLObject::set_onselect()
 HTMLObject::set_tabindex()
 HTMLObject::taghtml()

Inherited From StylableObject

 StylableObject::StylableObject()
 StylableObject::clearstyle()
 StylableObject::setclass()
 StylableObject::setcss()
 StylableObject::setid()
 StylableObject::setstyle()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3