diff --git a/src/Form/Filters/Constraints/BooleanConstraintType.php b/src/Form/Filters/Constraints/BooleanConstraintType.php index e04e88d3..ebc5ce09 100644 --- a/src/Form/Filters/Constraints/BooleanConstraintType.php +++ b/src/Form/Filters/Constraints/BooleanConstraintType.php @@ -24,6 +24,8 @@ use App\DataTables\Filters\Constraints\BooleanConstraint; use App\Form\Type\TriStateCheckboxType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; class BooleanConstraintType extends AbstractType @@ -43,4 +45,10 @@ class BooleanConstraintType extends AbstractType 'required' => false, ]); } + + public function finishView(FormView $view, FormInterface $form, array $options) + { + //Remove the label from the compound form, as the checkbox already has a label + $view->vars['label'] = false; + } } \ No newline at end of file