LMSouq
moodle-core Open

Moodle Form Validation : Using errors array

BH
Bhargava
1 month ago
3 views
Problem Description
This is a basic question but again after lot of search I could not get how to do. I am for the first time trying to place custom validations. I have created errors array in validations method of the form. But I do not know where to capture this array. In a page, I am creating the form as $cnClHpsFrm = new cl_manage_form( $CFG->wwwroot . '/local/hps/cl_manage_hps.php?id='.$currCourseid,array('housesArr'=>$housesArr,'currCrseStudentsArr'=>$currCrseStudentsArr,'currCourseid'=>$currCourseid) ); In this same file, I have the three conditions for form cancel, submit and form display. Please help and guide.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base