When a form is submitted, I'm validating it with Deform. If validation fails I'm passing back the same form with validation warnings attached, and it is replacing the old form. This works fine with AJAX, the first time. After the first time, it appears that the submit button of the Deform form is no longer bound.
When the page first loads, and deform_loaded === true
, the deform.callbacks array is empty. However, the form properly submits via ajax. After the second go-round, deform.callbacks now contains 1 array mapping my from to a callback. However, when I now submit, ajax isn't used and the page refreshes.
How can I get the updated form's submit
to be bound like the original form's submit
?