public function edit_field_set_default($mform) {
        if (!empty($this->field->defaultdata)) {
            $mform->setDefault($this->inputname, $this->field->defaultdata);
        }
    }
public function edit_field_set_default($mform) {
        if (!empty($this->field->defaultdata)) {
            $mform->setDefault($this->inputname, $this->field->defaultdata);
        }
    }
public function edit_field_set_default ( $ mform ) { if ( ! empty ( $ this -> field -> defaultdata ) ) { $ mform -> setDefault ( $ this -> inputname , $ this -> field -> defaultdata ) ; } }
Sets the default data for the field in the form object
@param  moodleform $mform instance of the moodleform class
Sets the default data for the field in the form object