Autofill form fields after first field is filled without reloading the page

Re: Autofill form fields after first field is filled without reloading the page

by A. Obeid -
Number of replies: 0
Hi,

$PAGE->requires->js('/blocks/usp_mcrs/module.js'); this line must be in the file where the $mform->display(); is called.
The action.php (Or your form->display()) is executed after the user enter his text in the code-field. The form-page will be reload.
In your requestcourse_form.php should
$coursecode = optional_param('coursecode', null, PARAM_TEXT);
If $coursecode is not null, get course information and return the form with the Information.