DHTMLX Docs & Samples Explorer

forEachItem(handler)

Iterator. Calls user-defined handler for each item and passes item name into it as an argument.

Parameters:

  • handler - a user-defined handler.
    Gets 2 arguments:
    • id - the item id (the item's parameter 'name').
    • radioValue - the value of a radio button ( the radio's parameter 'value'). Required for 'radio' items only
myForm.forEachItem(function(id, radioValue){
   myForm.setItemLabel(id, String(myForm.getItemText(id)).toLowerCase());
});