Hi Team,
I have a form in the form select categories. As per categories, I want to select course to resolve this problem I am using ajax to fetch course after select categories.
for categories
$mform->addElement('select', 'categories', 'Categories', $categoriesarray);
and for course
$mform->addElement('select', 'course', 'Course', $coursearray);
use addElement.
But after fetch value through ajax in the course element.
It is showing all value successfully.
But after click on View button.
$this->add_action_buttons(true, 'View');
couse value not pass in view page.
stdClass Object ( [categories] => 2 [submitbutton] => View )
thanks for reply.