Symfony 5: The Fast Track is the best book to learn
modern Symfony development, from zero to production. +300 pages in full color showing how to
combine Symfony with Docker, APIs, queues & async tasks, Webpack, Single-Page Applications, etc.
The following options are defined in the
The BaseType class is the parent class for both the button type
and the FormType, but it is not part
of the form type tree (i.e. it cannot be used as a form type on its own).
If you want to add extra attributes to the HTML representation of the button,
you can use attr option. It’s an associative array with HTML attribute
as a key. This can be useful when you need to set a custom class for the button:
If you don’t want a user to be able to click a button, you can set the disabled
option to true. It will not be possible to submit the form with this button,
not even when bypassing the browser and sending a request manually, for
example with cURL.