addField($groupids) ->addField(array_key_exists('exclude_groupids', $data['fields']) ? new CWidgetFieldMultiSelectGroupView($data['fields']['exclude_groupids'], $data['captions']['groups']['exclude_groupids'] ) : null ) ->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 CWidgetFieldRadioButtonListView($data['fields']['evaltype']) ) ->addField( new CWidgetFieldTagsView($data['fields']['tags']) ) ->addField( new CWidgetFieldCheckBoxView($data['fields']['maintenance']) ) ->show();