Issues with accessing multiCheckbox options

Hello everyone!

I’m trying to create a custom import source for a JSON array into IcingaWeb2, and am attempting to use a form element called multiCheckbox to create a list of checkboxes to act as a form of filtering for the array (only elements which contain the ticked checkboxes’ names as part of one of their properties will appear.)

The main issue I’m having is that there doesn’t appear to be a lot of use of multiCheckbox out there for me to base this off of; Netbox import seems to have it commented out, but doesn’t actually use it. So far, regardless of what options I tick on the checkbox list, it gives this error:


Code-wise, this is how the multiCheckbox appears in the form:

    $form->addElement('multiCheckbox', 'test_multibox', array(
  	'label' => $form->translate("Test Multi-Checkbox"),
  	'required' => false,
  	'description' => $form->translate('A test checkbox with multiple options which does nothing. Yet.'),
  	'multiOptions' => array(
            'a',
            'b',
            'c'
        )
  ));

The setting of this is retrieved and entered into a variable, much like a regular checkbox, which is then given to the constructor for the main import class, which should in theory allow it to, like a regular checkbox, be used in a Boolean-like way.
Is it possible for any examples of how I can use a multiCheckbox to be posted here for reference? Or any further help which can be provided. I would be happy to provide more information if needed.
Here is my Icinga Web 2 and PHP version information:

Icinga Web 2 Version 2.11.4
Git commit 11453bfa92a70a44efbf7f966f5e7f27e9300a28
PHP Version 7.3.33

Thanks in advance!

do you still need a solution for that?
If yes upload your module to github and I can try to achieve this with a custom FormElement