Hi guys,
Firstly I'm super new to moodle development, so please go easy on me! 😊
I am wondering if in the second argument for adding an html element to a form you can use an actual html file rather than having to write out actual html in the second argument. Below is a test snippet to make what I'm talking about clearer:
$mform = $this->_form; $mform->addElement('header', 'config_header', 'test header'); $mform->addElement('html', '<style> #h1 { color: red; } </style> <div> <h1 id="h1">Hello world</h1> </div>' );
I ask because I want to use a .css style sheet as well as (not sure if this is actually possible in a moodle form) having php elements in the file.
Thanks !