To add/remove some dhtmlxForm's item dynamically, you should use one of the following methods:
var itemData = {type: "label", label: "Video settings", list:[ {type: "select", name: "video_codec", label: "Codec", options:[ {text: "DivX", value: "DivX"}, {text: "XviD", value: "XviD", selected: true} ]}, {type: "select", name: "video_bitrate", label: "Bitrate", options:[ {text: "1226 kbps", value: "1226", selected: true}, {text: "2412 kbps", value: "2412"} ]} ]}; myForm.addItem(null, itemData, 3); ... myForm.removeItem("video_bitrate");