I need to change a field that is set as "text" right now into a "Date Time Selector" field. The date time selector is already an object used in other places in the application, I just need to figure out how to add it to this field.
Here is the code for the date time selector used in another php file:
$mform =& $this->_form;
$mform->addElement('date_time_selector', 'assesstimestart', get_string('from'));
Here is the definition of the element:
date_selector ([string $elementName = last_attend_date], [mixed $elementLabel = null], [array $options = array()], [mixed $attributes = null])
Here is the section of code I need to change from text to use this:
$table->data[$student->id][] = '<input type="text" name="last_attend_date'.$student->id.'" size="" value="'.($att ? $att->last_attend_date : '').'">';
Can anyone help me? Suggestions?