Category: builder

Symfony 3.14 createForm builder undefined method add

I am trying to validate reqest, so i am want to create form to do it. i call below method in my controller $form = $this->createForm(RecipientFormType::class); RecipientFormType class class RecipientFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) {…

Symfony 4 – Can not customize attr for form field in formBuilder

I have a feature that allows me to round the corners of my buttons with this code: <input type=”checkbox” class=”custom-control-input” id=”toggle-border-radius”> <label class=”custom-control-label” for=”toggle-border-radius”>Border radius</label> which will call this JS script : // toggle border radius $(“#toggle-border-radius”).change(function (e) { e.preventDefault();…