Skip to content
Advertisement

Tag: forms

Rendering multiple forms on same page with Symfony 3

I’d like to show a login and a registration form on the same page. However it seems that we cannot render the same template with different form variables in different two actions in a controller. Here is what I mean; } Above I have my login and registration action. I’d like to pass the ‘form’ variable to the same twig

How does a PHP page retrieve form data?

I am new to PHP and am taking the PHP course on W3Schools. In the form handling part of the course, I read that there are two methods of handling form data: POST and GET. I understand that depending on the method used, a superglobal variable is created which stores the data as key-value pairs. And at the destination page,

Laravel – Form validation error – argument 2 must be array

I’m working with Laravel and every time I submit my form it gives me this error: ErrorException in Factory.php line 91: Argument 2 passed to IlluminateValidationFactory::make() must be of the type array, null given, called in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php on line 83 and defined This is some code for the controller, even when I don’t try to send data to the database

Symfony form collection rendering

I’m using symfony 2.3 I have form with field of type “collection” Visualization code in twig: Everything work, expect when form.fields is empty. Then nothing is visualized in twig loop, witch is fine. But at the end of the form there is “label” for the element “form.fields”. Only label. Workaround: If there are elements, they will be rendered in the

Advertisement