formslib plus ajax

Re: formslib plus ajax

by Martin Contreras -
Number of replies: 0

Hi ,

I´m making some changes in configurable reports. I´d like to use two selects, one depends of the other one. The first one contains the activity module and the other one (child) contains the items in the course of this activity. For example, The first select contains: forum, quiz, lessons, etc. And the next one depends of the activity. I select forum the select contains forum 1, forum 2, forum n. 

 

this is my code:

$options = array('1'=>"Forum", '2'=>'Lesson', '3'=>'Quiz');
$mform->addElement('select', 'opcionesActividad', 'Actividad',$options);

$mform->addElement('select', 'itemsActividad', 'itemsAcividad',$options that depend of the other select);

I hope you can help 

Thanks in advance

Martin