N°7063 - Forms SDK - Add Symfony forms component

error forms issue
This commit is contained in:
Benjamin Dalsass
2023-12-27 14:41:20 +01:00
parent 5edf092a24
commit d6970f6486
7 changed files with 119 additions and 24 deletions

View File

@@ -26,6 +26,7 @@ use LogAPI;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
@@ -68,6 +69,13 @@ class SymfonyBridge
'options' => $oFormDescription->GetOptions()
];
case FormFieldTypeEnumeration::AREA:
return [
'path' => $oFormDescription->GetPath(),
'type' => TextareaType::class,
'options' => $oFormDescription->GetOptions()
];
case FormFieldTypeEnumeration::DATE:
return [
'path' => $oFormDescription->GetPath(),
@@ -90,7 +98,6 @@ class SymfonyBridge
$aItems[] = $aSymfony;
}
$aOptions['descriptions'] = $aItems;
$aOptions['inherit_data'] = true;
return [
'path' => $oFormDescription->GetPath(),
'type' => FormObjectType::class,