protected function get_form_start_date($mform, $fieldnames) {
        $startdate = $mform->getElementValue($fieldnames['startdate']);
        return $mform->getElement($fieldnames['startdate'])->exportValue($startdate);
    }