formapro / JsFormValidatorBundle

The Javascript validation for Symfony 2, 3 and 4 forms
MIT License
128 stars 56 forks source link

Preserve submit button in the request #132

Open richard-ejem opened 7 years ago

richard-ejem commented 7 years ago

Currently, the submit button is not preserved because this package calls event.preventDefault, then, if the form is valid, sends form.submit(). I proposed a fix in #131 , so please take a look at it.

The problem is that such checks currently do not work in Symfony:

if ($myForm->get('back')->isClicked()) { ... }