I'm building a questionnaire that is shown in two templates but I need to not show some filed in one of the templates
$builder
->add('acceptConsent', CheckboxType::class, [
'label_attr' => [
'class' => 'font-weight-bold'
],
'required' => true,
'constraints' => new NotBlank(),
'disabled' => $readOnly,
])
there is any way to set the form to not render a field?