add_intro_editor()

add_intro_editor()

by Aaron Leggett -
Number of replies: 2

Im creating my own activity module and would like to add 'Help text' to the default intro textareas.

Im using the $this->add_intro_editor(); and have tried adding $mform->addHelpButton('intro', 'intro', 'langfilename'); but i am givent the following error message. Is there an easy way to add this help feild to the default text areas?

 

Trying to add help buttons to non-existent form elements : intro

  • line 1921 of /lib/formslib.php: call to debugging()
  • line 63 of /mod/scormcontroller/mod_form.php: call to MoodleQuickForm->addHelpButton()
  • line 191 of /lib/formslib.php: call to mod_scormcontroller_mod_form->definition()
  • line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
  • line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()

 

Average of ratings: -
In reply to Aaron Leggett

Re: add_intro_editor()

by Damyon Wiese -
It should be $mform->addHelpButton('introeditor', 'intro', 'langfilename');

And you need FEATURE_MOD_INTRO in your xxx_supports() callback (in your module lib.php).

Cheers, Damyon
In reply to Damyon Wiese

Re: add_intro_editor()

by Aaron Leggett -

Thanks Damyon,
Thats worked great for me, I was just using 'intro' instead of 'introeditor'

Cheers