Element "zpro > ProcessForm > ProcessBlock > ComboEditBox"

Top  Previous  Next

(Since version 5.2)

ComboEditBox element allows to select one of the listed options or enter a new value. In that sense it is different than the regular ComboBox element.Additionally the finding and selecting the desired option is easier with this element by utilizing its locating or filtering functionality.

When the process form that this element is in is submitted, two parameters are included into the request.

1.Field: Its name is identical with the element name and its value is the text entered in to the edit box of the element.
2.Associated Field. The name of it is specified through the "Associated Field Name" property and its value is the value associated with the selected option text. Therefore if a new value is entered into the edit box then the value of this field will be empty.

 

ComboEditBox_pe

 

Properties

Associated Field Name

The name of the parameter that will contain the associated value.

Associated Field Value

The initial value for the associated field.

Source ComboBox

It is possible to make use of the options of another combobox if its html id is specified in this property. This feature is useful if the ComboEditBox is located in a repeating process block and the number of the options are many.  For such cases referring to the options of an combobox (probably a hidden one) defined outside the repeating block is better idea than repeating the same set of options for each record and therefore increasing the size of the HTML document.

Open On

Defines the method to open the drop-down box. The choices:

1.Focus. The drop-down box opens when ComboEditBox gains focus.
2.Single-Click: The drop-down box opens with a single mouse click on ComboEditBox.
3.Key Stroke: The drop-down box opens by a double mouse click or by a key stroke after ComboEditBox gains focus.

Selection Type

The options matched as characters typed into the ComboEditBox are displayed in the drop-down box and one of the options marked as selected. The choices for selecting the options are:

1.Locating. All the options are displayed in the drop-down box and the first option that matches the entered characters is highlighted.
2.Filtering. The drop-down box displays only the options that match the entered characters.

Search

This property defines how to match the options with the entered characters. The choices are:

1.The First Position: The entered characters are searched starting from the the first position of the option texts.
2.Any Position: The entered characters are searched at any position of the option texts.

Drop-down Box

Number Of Visible Options

Defines the number of the options to be shown in the drop-down box. To see the others the box needs to be scrolled with mouse or with up/down arrow keys.

Width

The width of the drop-down box in pixel.

Event Handlers

On Focus Option

The name of the Javascript handler function to be called each time an option got focus. The function receives an object that has the properties text, value and node. Example Code:

 

var TEXT_VALUE, ID_VALUE;

function OnOptionFocus(obj) {
  TEXT_VALUE = obj.text;
  ID_VALUE = obj.value;

}

 

 

On Change

The name of the Javascript handler function to be called when the value of this field changes. The function receives the handle of ComboEditBox object. Example Code:

 

function OnChange(ceb) {
  alert(ceb.getValue());
}

 

Validation

Required

Options:

1. None. It is not obligatory to enter a value to the input field

2. Value. A value must be given into the input field.

3. Value and the Associated Value. A value must be given into the input field and there has to be an associated value with the entered value.

4. Associated Value. It is not obligatory to enter a value to the input field. However if a value is entered into the input field there has to be an associated value with it.

5. Value without an Associated Value. A value must be given into the input field and there must not be an associated value with it. This option is typically used to force the users to enter brand new values.

Custom Validation Function

Validation Error Handler

See Validating User's Input.

 

See Other Input Elements.