Closed
Description
In trying to fix some 2.8 deprecation warnings and I've come across an issue where entry_options are not passing to the underlying formType
. I'm not sure if this is me or its a bug, but I'll try to explain as clearly as I can.
using a CollectionType
form field as follows:
Parent form
// ...
$builder->add( 'teacher_scale_versions', CollectionType::class, array(
'entry_type' => BudgetVersionTableType::class,
'entry_options' => array(
'school' => $school,
'data_class' => 'SBS\BudgetBundle\Entity\BudgetTeacherScale',
'version_type' => SBSBudgetBundle::REFERENCE_TEACHER_SCALES,
),
// .......
child form
// ....
public function configureOptions( OptionsResolver $resolver) {
$resolver->setRequired( array( 'version_type', 'school' ) );
}
error:
The required options "school", "version_type" are missing.
Using xdebug to see whats being passed where, it seems that the entry_options
are not making it through to the child BudgetVersionTableType::class
which needs them.
Metadata
Metadata
Assignees
Labels
No labels