Here is a sample extract from my form
1 $mychoices = array(0,1,2,3,4);
2 $mygroup = [];
3 $mygroup[] = $mform->createElement('select', 'myelement0', 'label myelement0', array(0,1,2,3,4));
4 $mygroup[] = $mform->createElement('advcheckbox', 'myelement1', 'label myelement1');
5 $mform->addGroup($mygroup, 'mygroup');
6 $mform->addHelpButton('mygroup', 'help');
7 $mform->addHelpButton('mygroup[myelement1]', 'help');
8 $mform->hideIf('mygroup[myelement1]', 'mygroup[myelement0]', 'neq', 0);
And the result:
It all works as expected, except for the $mform->addHelpButton('mygroup[myelement1]', 'help') which throws an error:
"Trying to add help buttons to non-existent form elements : mygroup[myelement1]"
What does not look logical is that the form element mygroup[myelement1] is indeed recognized in the hideIf instruction (line 8) but considered as "non-existent" in the addHelpButton (line 7).
Any ideas? Is this a bug in the forms API?