public function prepare_for_config_form(\stdClass $formdata) {

        if (!empty($formdata->configdata['defaultvalue'])) {
            $textoptions = $this->value_editor_options();
            $context = $textoptions['context'];

            $record = new \stdClass();
            $record->defaultvalue = $formdata->configdata['defaultvalue'];
            $record->defaultvalueformat = $formdata->configdata['defaultvalueformat'];
            file_prepare_standard_editor($record, 'defaultvalue', $textoptions, $context,
                'customfield_textarea', 'defaultvalue', $formdata->id);
            $formdata->configdata['defaultvalue_editor'] = $record->defaultvalue_editor;
        }
    }