Class DBLComboField

Description

Combo field - selects one of N choices.

This creates a field which will allow storing one of N possible values into the field. This field provides static choices (defined when creating the field). If you wish to get the choices from a table, see DBLLCField or DBLJSLCField.

Each possible value has a ID (key of the array) and a Text (value of the array). The ID is stored into the database, the text is displayed to the user. Both ID and Text are treated as strings.

NOTE: This field checks, if the value (ID) from the edit form matches a key in the choices array. If no, it prints out an error message. So it is not possible for user to cheat-in ID that is not in the choices.

Located in /DBLComboField.php (line 27)

DBLField
   |
   --DBLComboField
Direct descendents
Class Description
DBLLCField This implements basic type of lookup combo field.
Variable Summary
string $anyID
string $anyText
array $choices
Method Summary
DBLComboField DBLComboField (string $name, string $titleTxt, string $titleHTML, array $choices)
void acceptFilterValue (mixed $value, mixed &$r, mixed &$arr)
void checkValue (mixed $value, mixed &$err, mixed &$r, mixed $new)
void formatDetail (mixed $value, mixed &$r)
void formatEdit (mixed $value, mixed &$r, mixed $dataSource, mixed $formName)
void formatFilter (mixed $value, mixed &$r, mixed $formName)
void formatIndex (mixed $value, mixed &$r)
void formatWidget (mixed $value, mixed $includeAnyValue)
Variables
string $anyID (line 38)
  • var: The "ANY" ID. Used in filter to determine that the filter for this field is turned off. Default is "__ANY__". Set it to anything else if you use this as an ID.
string $anyText (line 43)
  • var: The "ANY" text for filter. You will probably not need to set it. The default is localized (gettext) "<Any>".
array $choices (line 32)
  • var: Possible ids/texts of the field.

Inherited Variables

Inherited from DBLField

DBLField::$addAsterixes
DBLField::$allowEmpty
DBLField::$computed
DBLField::$dbName
DBLField::$default
DBLField::$detailAttributes
DBLField::$detailPostfix
DBLField::$detailPrefix
DBLField::$editAttributes
DBLField::$editPostfix
DBLField::$editPrefix
DBLField::$filterAttributes
DBLField::$filterPostfix
DBLField::$filterPrefix
DBLField::$indexAttributes
DBLField::$indexPostfix
DBLField::$indexPrefix
DBLField::$lookupField
DBLField::$name
DBLField::$needsMultipart
DBLField::$noOrderByTitle
DBLField::$readOnly
DBLField::$referenceURL
DBLField::$titleHTML
DBLField::$titleTxt
DBLField::$widgetAttributes
Methods
Constructor DBLComboField (line 54)

Constructor.

DBLComboField DBLComboField (string $name, string $titleTxt, string $titleHTML, array $choices)
  • string $name: name Name of the field. See DBLField::DBLField.
  • string $titleTxt: titleTxt Textual title. See DBLField::DBLField.
  • string $titleHTML: titleHtml HTML title. See DBLField::DBLField.
  • array $choices: choices The array containing pairs ID => Text which determine possible values of the field (i.e., user choices).
acceptFilterValue (line 110)
void acceptFilterValue (mixed $value, mixed &$r, mixed &$arr)

Redefinition of:
DBLField::acceptFilterValue()
Accept value from the filter.
checkValue (line 100)
void checkValue (mixed $value, mixed &$err, mixed &$r, mixed $new)

Redefinition of:
DBLField::checkValue()
Check value (from post)

Redefined in descendants as:
formatDetail (line 68)
void formatDetail (mixed $value, mixed &$r)

Redefinition of:
DBLField::formatDetail()
Format field for record detail.

Redefined in descendants as:
formatEdit (line 88)
void formatEdit (mixed $value, mixed &$r, mixed $dataSource, mixed $formName)

Redefinition of:
DBLField::formatEdit()
Format field for record edit form.

Redefined in descendants as:
formatFilter (line 95)
void formatFilter (mixed $value, mixed &$r, mixed $formName)

Redefinition of:
DBLField::formatFilter()
Format field for the filter form.

Redefined in descendants as:
formatIndex (line 63)
void formatIndex (mixed $value, mixed &$r)

Redefinition of:
DBLField::formatIndex()
Format field for record index.

Redefined in descendants as:
formatWidget (line 73)
void formatWidget (mixed $value, mixed $includeAnyValue)

Inherited Methods

Inherited From DBLField

DBLField::DBLField()
DBLField::acceptFilterValue()
DBLField::acceptValue()
DBLField::addCondition()
DBLField::checkValue()
DBLField::formatDetail()
DBLField::formatEdit()
DBLField::formatFilter()
DBLField::formatIndex()
DBLField::jsCheck()
DBLField::setTitle()
DBLField::splitValue()

Documentation generated on Mon, 6 Sep 2004 21:57:03 +0200 by phpDocumentor 1.2.3