This topic contains 1 reply, has 2 voices, and was last updated by igalayev 5 years, 10 months ago.
- Topic
I’m implementing one-to-many relationship bewteen opportunity and interested product. It’s almost done. But I found that the interested product entity is always initialized as 1 in the create opportunity page. By default, there should be no interested product entity in a opportunity.
I tried the following setting with empty_data but doesn’t work
1234567891011$builder->add('items','oro_address_collection',array('label' => '','type' => 'tv_productinterest','required' => false,'options' => array('data_class' => 'Tv\Bundle\SalesBundle\Entity\ProductInterest'),'empty_data' => []));also the empty_data in CollectionType
1234567891011121314$resolver->setNormalizers(array('required' => false,'empty_data' => null,'options' => function (Options $options, $values) {if (!$values) {$values = array();}$values['single_form'] = false;return $values;}));however, I still see the default product interest form displayed in create opportunity page. Is there an option can help setup this?
Thank you in advance!
The forum ‘OroCRM’ is closed to new topics and replies.