Hi, in my database these are my following tables:
course(id,name, ..., ...),
private_course(id, IDcourse,IDuser), both as foreign key, IDcourse to course table and IDuser to users table,
private_courses_requests(id, IDprivate_course, IDemployee, status, comment) IDprivate_course as foreign key to private_courses,
portal_users(id, first_name, last_name, ..., ..., )
When I want to create a private course, it works good, there is a dropdown with users and a dropdown wth courses, but when I want to create a private_course_request the dropdown displays the id of the private_course.
These are my questions:
How can I change the value of the dropdown to display the name of the course instead of the id? I know that it is not displaying the name, because the table private_courses doesn't have that field.
My second question is how can I change the drop_down value when I want to create a private_course to display first_name + last_name, instead of just first_name?
Greetings.
Comments
$fields['IDuser'] = array( 'type' => 'select', 'model' => array('portal_user' => 'get_admin_names'), 'first_option' => 'Select one...' );
I would access to the method get_admin_names in my portal_user_model. But it is displaying me this message: "Unable to locate the file: get_admin_names_model.php".
The key is the model and the value the method, isn't it?
'model' => array('app' => array('portal_user' => 'get_admin_names')),