Create a new CollectionType attribute type in Sylius

class ProductDayType extends AbstractType
{
// …

public function buildForm(FormBuilderInterface $builder, array $options): void
{
    
      $builder
        ->add('title', TextType::class,array(
  'label' => 'Title ',
  'attr' => array(
      'placeholder' => 'Title'
  )

))
->add(‘details’, TextType::class,array(
‘label’ => 'Details ',
‘attr’ => array(
‘placeholder’ => ‘Details’
)
));

class ProductDayCollectionType extends AbstractType
{
// …

public function buildForm(FormBuilderInterface $builder, array $options): void
{
    


  $builder->add('productDays', CollectionType::class, [
       'entry_type' => ProductDayType::class,  
            'entry_options' => ['label' => false],
    'allow_add' => true,

    ])
          ;
 
}

image

now i did changes in attributeValue.html.twig to add collection . but on submit data its saved as null collection like {“product”:[]}