Moodle forms have a set_data() method that allows you to populate the form.
You pass an array or object containing data you wish to populate your form with, the key/property names need to match the field names of the form.
Moodle forms have a set_data() method that allows you to populate the form.
You pass an array or object containing data you wish to populate your form with, the key/property names need to match the field names of the form.