|
ComboEditBox allows to select one of the listed options or enter a new value. In that sense it is different than the regular ComboBox field. Additionally the finding and selecting the desired option is easier with this element by utilizing its locating or filtering functionality.
ComboEditBox is a Process Field and It can be used inside or outside a ProcessRecord Element. It encloses a hidden input, a text input and a select element. The text input element is used to display the selected option text or to enter a new value. The hidden input element is used to store the option value associated with the entered or chosen option text.
<tr mo:type="ProcessRecord">
<td>
<span mo:type="ComboEditBox" mo:name="CATEGORY_ID" mo:value="{CATEGORY_ID};{CATEGORY_NAME}"
mo:props="
textFiedName:CATEGORY_NAME, srcCombo:''
openOn:2, selType:2, search:2, novo:12, required:3,
valHandler : MyValHandler, valErrorHandler: MyErrorHandler" />
<input name="elm" type="text" />
<input name="selm" type="hidden" />
<!-- Not required if srcCombo is used -->
<select name="oelm" disabled="disabled" style="display:none">
<option value="1">NoteBook</option>
<option value="2">Desktop</option>
<option value="3">Printer</option>
</select>
</span>
</td>
</tr>
|
The select element of the field is invisible and is used as the source for the options. Alternatively an external select element can be used by specifying its id in the srcCombo property. In that case there is no need to enclose a select element in the field. See below.
<table>
<tr mo:type="ProcessRecord">
<td>
<span mo:type="ComboEditBox" mo:name="CATEGORY_ID" mo:value="{CATEGORY_ID};{CATEGORY_NAME}"
mo:props="
textFiedName:CATEGORY_NAME, srcCombo:'SRC_PROD_CATS'
openOn:2, selType:2, search:2, novo:12, required:3,
valHandler : MyValHandler, valErrorHandler: MyErrorHandler" />
<input name="elm" type="text" />
<input name="selm" type="hidden" />
</span>
</td>
</tr>
</table>
<select id="SRC_PROD_CATS" style="display:none">
<xsl:for-each select="/root/prodcats/item">
<option value="{ID}"></xsl:value-of select="NAME"/></option>
</xsl:for-each>
</select>
|
See ComboEditBox function class in MoreMotion Face API.
See Validation Properties
This element requires the following Javascript files are linked to the page in the HEAD section of the HTML document as follows.
<head>
...
<script type="text/javascript" src="moremotion/face/Process/ComboEditBox.js"></script>
</head>
|
|