Issue
Hello im new to moodle plugin development and I need to make the "Enter course schedule here..." in the third line disappear when I enter text. If im not mistake it is called placeholder but i dont know how to implement to.
Php code in my own moodle plugin
Solution
Try:
$mform->addElement('text', 'sched_code', 'Schedule Code', ['placeholder' => 'Enter course schedule here...']);
Although, you will want to use get_string() for both bits of text that are being output, rather than hard-coding them like that, so that they can be translated / customised as required.
Answered By - davosmith Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.