I really need some help. I am very close to solving a problem, but am totally frustrated. I am trying to add a Date Selector to a existing table. I've got the Date Selector appearing on the screen but for some unknown (and very frustrating) reason, I can't get it to appear in the table.
Here is full code for the table. I am highlighting in blue the line that is giving me trouble:
if ($students) {
unset($table);
$table->width = '0%';
$table->head[] = '#';
$table->align[] = 'center';
$table->size[] = '20px';
$table->head[] = '';
$table->align[] = '';
$table->size[] = '1px';
$table->head[] = $fullnamehead;
$table->align[] = 'left';
$table->size[] = '';
$table->wrap[2] = 'nowrap';
foreach ($tabhead as $hd) {
$table->head[] = $hd;
$table->align[] = 'center';
$table->size[] = '20px';
}
$i = 0;
foreach($students as $student) {
$i++;
$att = get_record('courseattendance_log', 'attsid', $attsid, 'studentid', $student->id);
$table->data[$student->id][] = (!$att && $update) ? "<font color=\"red\"><b>$i</b></font>" : $i;
$table->data[$student->id][] = print_user_picture($student->id, $course->id, $student->picture, 20, true, true);//, $returnstring=false, $link=true, $target='');
$table->data[$student->id][] = "<a href=\"view.php?id=$id&student={$student->id}\">".((!$att && $update) ? '<font color="red"><b>' : '').fullname($student).((!$att && $update) ? '</b></font>' : '').'</a>';
if ($att) {
$status = $att->status;
} else {
$status = '';//'A';
}
foreach($settings as $set) {
$table->data[$student->id][] = '<input name="student'.$student->id.'" type="radio" value="'.$set->status.'" '.($set->status == $status ? 'checked' : '').'>';
}
$table->data[$student->id][] = '<input type="text" name="last_attend_date'.$student->id.'" size="" value="'.($att ? $att->last_attend_date : '').'">';
[COLOR="Blue"]$table->data[$student->id] [] = 'testing'.print_date_selector("startday", "startmonth", "startyear");[/COLOR]
I am attaching a screen shot of how the results appear. The problem is the Date Selector fields are appearing at the top of the screen and they should be in the table where the words "testing" appear now.
Can anyone help?? Please, I am so stuck!