Language References
Sets or retrieves which field of a given data source ( as specified by the dataSrc property ) to bind to the given object.
HTML |
<element DATAFLD = sField ... > |
Script |
object.dataFld [ = sField ] |
sField |
String specifying the field name. |
The property is read/write with no default value.
The property can be set at design time and at run time. At design time, use the DATAFLD attribute.
In the following example, a text box is bound to the flavor field supplied by a data source object with an ID of ice_cream. Because the text box is contained within a table, the text box is repeated and all values in the flavor column are displayed.
<table DATAsrc="#ice_cream">
<tr>
<td><input type=TEXT DATAFLD=flavor></td></tr>
</table>
In the following example the SELECT object is bound to the card_type column of a data source control with an ID of order. The value of the field in the data set determines the option that is initially selected. In addition, when the user selects a different option from the SELECT, the value of the card_type field in the current record of the data set is updated.
<select DATAsrc="#order" DATAFLD="card_type">
<option>Visa
<option>Mastercard
<option>American Express
<option>Diner's Club
<option>Discover
</select>