private function getFieldType(array $formFieldConfiguration, array $fieldConfiguration)
    {
        if (isset($formFieldConfiguration['fieldtype'])) {
            return $formFieldConfiguration['fieldtype'];
        }

        $fieldType = null;
        switch ($fieldConfiguration['datatype']) {
            case 'BOOLEAN':
                $fieldType = CheckboxType::class;
                break;
            case 'DATE':
                $fieldType = DateType::class;
                break;
            case 'DATEINTERVAL':
                $fieldType = TextType::class;
                break;
            case 'DATETIME':
                $fieldType = DateTimeType::class;
                break;
            case 'DECIMAL':
                $fieldType = NumberType::class;
                break;
            case 'FILE':
                $fieldType = FileType::class;
                break;
            case 'FLOAT':
                $fieldType = NumberType::class;
                break;
            case 'INTEGER':
                $fieldType = IntegerType::class;
                break;
            case 'SET':
                $fieldType = ChoiceType::class;
                break;
            case 'TEXT':
            case 'HTML':
            case 'JSON':
                $fieldType = TextareaType::class;
                break;
            case 'VARCHAR':
                $fieldType = TextType::class;
                break;
        }

        if (isset($formFieldConfiguration['options']) || isset($fieldConfiguration['options'])) {
            $fieldType = ChoiceType::class;
        }

        return $fieldType;
    }