I'm working on add help button in Moodle form.
The code is "$mform->addHelpButton('String', 'HelpField');
How can I specify a string in the HelpField using php?
Thank!
Hi Matteo,
If you look at the function declaration you will see which fields need to be passed through.
addHelpButton($elementname, $identifier, $component = 'moodle', $linktext = '', $suppresscheck = false)
The $elementname will be the form element the the help button should appear next to eg.'description'
$identifier is the string identifier eg. 'userdescription'
'userdescription' will then be the title of the help box and 'userdescription_help' will automatically be the text of the help box.
See the docs for more information http://docs.moodle.org/dev/lib/formslib.php_Form_Definition#addHelpButton