SuggestBox

Top  Previous  Next

SuggestBox is a Process Field. It can be used inside or outside of a ProcessRecord Element.

This highly configurable element can be used to provide the users with, as the name implies, suggest functionality. What can be understood from the suggest functionality is to offering users a set of options retrieved from data sources as the user types into the input field.

SB_Sample

It encloses:

A text input element that keeps the text value to view and to edit (similar to the option text of an HTML select element)
A hidden input that keeps the value that corresponds to the typed text value (similar to the value of an HTML select element)

       

See SuggestBox function class in  MoreMotion Face API.

actionParams configuration for SuggestBox:

  <actionParams name="SBox_Products_Action">
    <param name="dataSource">sbox_prods</param>
    <param name="nodesToEncrypt">ID</param>
    <param name="responseHandler">SBoxMgr.buildDropDownBox</param>
  </actionParams>  

Parameters

dataSource (Accepts MScript)

The name of the data source definition that is configured with dataSource configuration element.

nodesToEncrypt (Accepts MScript)

The names of the nodes (separated with commas) whose values to be encrypted. If more than one data sources are used then the nodes belonging to the different data sources should be separated with a semi-column.
 
e.g.: ID;ID,PRODUCT_ID

responseHandler (Accepts MScript)

The name of the response handler Javascript function that will receive the AjaxResponse and manage the refreshing of the target blocks. Unless a very special treatment is required the value of this element can be left to its default which is SBoxMgr.buildDropDownBox.

 

Required Javascript Files

This element requires the following Javascript file is linked to the page in the HEAD section of the HTML document as follows.

  <head> 
    ...
    <script type="text/javascript" src="moremotion/face/Ajax/SuggestBox.js"></script>
  </head>