Hello. I'm creating a form using moodle forms. There are many fields in the form - course code, course name, course faculty, etc. I'm trying to figure out how to automatically fill the other fields after the user enters the course code. All the data for the fields exist in the block_mcrs_courses table. So when the user enters course code, I want to get the corresponding course name, course faculty, etc, for that course code and fill the other fields.
I've done some searching and found that AJAX is required. I'm not really sure how to use AJAX with moodle forms. Any help would be appreciated.