hi,
I have a form with several fields in it .
$mform->addElement('text', name', get_string('tname', 'local_access'));
$mform->addElement('textarea', 'desc', get_string("desc", "local_access"));
$courseitem = get_all_courses();
$options = array( 'multiple' => true);
$mform->addElement('course', 'courses', get_string('courses', 'local_access'), $options); // In this course are stored in table with not their name but with their id (using explode, implode). Example :- Course name = B.Tech(id = 1), BBA(id = 2). Table's column will store 1,2
$mform->addElement('text', 'currency', get_string('currency', 'local_access'), array('size' => 10));
$mform->addElement('select', 'duration', get_string('duration', 'local_access'), $duration); // $duration:- it receives in term of days in calculated form. Example :- if input is 2 year, then table will store 720 days.
____________________________________________________________________________________________________________________________________________________________
When i edit this form, i get only name and desc and all other filed values goes lost in spite of using $mform->setData($data);
What thing i need to do to have all data in the form field on editing the form.