×
Menu
Index

4.1.13. combobox

 
With a Combobox a user can select a value in a listbox. The possible values are pre-defined. This is the difference woth a combobox, where the values are filtered according to the user input.
 
Combobox to select the language.
 

Data part:

 
The possible options are predefined. A combobox is mostly used if the options are limited.
 
{
"display": "Language:",
"tooltip": "Language of the customer.",
"fieldname": "taal",
"length": 1,
"inputtype": "combobox",
"block": 1,
"newline": false,
"labelwidth": 1,
"fieldwidth": 2,
"options": [
     {
       "option": "NL",
       "value": "N"
     },
     {
       "option": "FR",
       "value": "F"
     },
     {
       "option": "EN",
       "value": "E"
     },
     {
       "option": "DE",
       "value": "D"
     }
  ]
}
 
  • inputtype: combobox
  • options: array with the possible options. Each row in the options array has two elements:
  • option: data to show in the combobox and to display after selection.
  • value: value to return after selection, to save in the fieldname.
 
 
Remark: The field taal always contain the value. Also when there is a GET request, taal has to be the value. When displaying it on the screen, BOA will look for the option, and will display the content of the option on the screen. This means that for the iAPI there is no need to make any conversion!
 
 
iAPI uses always the value.
 
In the above sample the field taal always contain the value. Also when there is a GET request, taal has to be the value. When displaying it on the screen, BOA will look for the option, and will display the content of the option on the screen. This means that for the iAPI there is no need to make any conversion, BOA takes care of that!