addField($groupids) ->addField(array_key_exists('hostids', $data['fields']) ? (new CWidgetFieldMultiSelectHostView($data['fields']['hostids'], $data['captions']['hosts']['hostids'])) ->setFilterPreselect(['id' => $groupids->getId(), 'submit_as' => 'groupid']) : null ) ->addField( new CWidgetFieldTextBoxView($data['fields']['problem']) ) ->addField( new CWidgetFieldSeveritiesView($data['fields']['severities']) ) ->addField( new CWidgetFieldRadioButtonListView($data['fields']['evaltype']) ) ->addField( new CWidgetFieldTagsView($data['fields']['tags']) ) ->addField( new CWidgetFieldIntegerBoxView($data['fields']['show_lines']) ) ->show();