This implements basic type of lookup combo field.
'Lookup' is a field where the value is chosen from a set of values (like in normal combo field) AND that set of values is got from a query. It is usually used to allow user edit a 1:N (one-too-many) relationship.
The lookup field uses two form fields - one hidden which is named like the field and the other one, read-only text box, which is used to show user textual value.
Lookup fields have also minor inconvenience. If you are displaying the field in the record index, there usually (see below) must be both versions included in the results of the query - both ID and the textual value. ID is named as the field, textual value should have the name of the field and _txt added. (I.e., the field ID would be named 'language', the field text 'language_txt'.) See example below. The detail and edit 'view styles' convert the id=>text at their own.
This quite complicates the query you use to display index ( :-( ), but there are two reasons:
If the two difficulties mentioned above do not bother you (you have plenty of processor power), you can set the indexDBConversion property to true. The conversion will then will be done by DB lookup for each index row. You have been warned.
The filter this field implements lets you choose one of the possibile values and show records which have it.
The method of selecting records from a combo is acceptable only for several tenths of records. If you wish to select from more records, you should see the DBLJSLCField class.
Located in /DBLLCField.php (line 57)
DBLField | --DBLComboField | --DBLLCField
Inherited from DBLComboField
DBLComboField::$anyID
DBLComboField::$anyText
DBLComboField::$choices
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::$titleHTML
DBLField::$titleTxt
DBLField::$widgetAttributes
Constructor.
Internal - fill the (inherited) 'choices' array property from database query.
Inherited From DBLComboField
DBLComboField::DBLComboField()
DBLComboField::acceptFilterValue()
DBLComboField::checkValue()
DBLComboField::formatDetail()
DBLComboField::formatEdit()
DBLComboField::formatFilter()
DBLComboField::formatIndex()
DBLComboField::formatWidget()
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:13 +0200 by phpDocumentor 1.2.3