Hi,
Could anyone advise me how when using the moodle forms I set what the selected item of a select menu is by default, e.g. when you edit an item instead of create a new item, the form will need to be filled in with values.
I have this as the creation of the select element:
$mform->addElement('select', 'criteria['.$crit['qualID'].']['.$unit->get_id().'][' . $crit['id'] . ']', $criterion->get_name(), $possibleValues);
Is it something I need to add in to that as another parameter? Or is it a rule I can aply to the element?
Or..?
Cheers.