General developer forum

Prepopulate a moodle form editor with content

 
Picture of Neill Magill
Re: Prepopulate a moodle form editor with content
 

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.

 
Average of ratings: -