Hi,
Is there a way to integrate Moodle mform with mustache template. Mform elements generates through mustache templates. However I want to put all the html design into a mustache template. Now I have form classes with html tags like this,
$mform->addElement('html', "<div class=\"col-sm-6 row\">");
$mform->addElement('html', "<div class=\"col-sm-4 col-form-label col-label col-border-left\">");
$mform->addElement('html', "Age:");
$mform->addElement('html', "</div>");
$mform->addElement('html', "<div class=\"col-sm-8 col-border-right\">");
$age = $mform->addElement('text', 'age', '');
$ageuom = array( 'years' => get_string('years', 'abc'),
'months' => get_string('months', 'abc'),
'weeks' => get_string('weeks', 'abc')
);
$ageselect = $mform->addElement('select', 'ageuom', '', $ageuom, array());
$mform->addElement('html', "</div>");
$mform->addElement('html', "</div>");
Is there a way to separate html tags from php file and put it into mustache template?
My goal is to separate HTMl design from php file.
Appreciate your help.