I would like to find a proper way to add a cancel close button next to the submit button on forms with Symfony 5. Based on my research on Internet, I found various ways :
add the button on the twig template with the submit_widget blog. It works, but I'm not able to change the route as I can't transfert any variables from the Controller.
add a simple like with
href="javascript:history.go(-1)". Efficient but ugly !add an other submit button with an formnovalidate attribute based on that post and that post. But I seems that this function is longer working in Symfony 5.
I can't figure out that this type of feature is not possible on a framework.
Thanks for your help.