Skip to content

Commit

Permalink
fix(form): re-enable submit on validation failure
Browse files Browse the repository at this point in the history
btry committed Oct 17, 2022

Unverified

No user is associated with the committer email.
1 parent 75d7599 commit e39f618
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/scripts.js
Original file line number Diff line number Diff line change
@@ -1392,6 +1392,11 @@ var plugin_formcreator = new function() {
window.location = data.redirect;
}
}).fail(function (xhr, data) {
$(form).find('[type="submit"]')
.html(i18n.textdomain('formcreator').__('Send', 'formcreator'))
.off('click');
$(form).removeAttr('data-submitted');

if (xhr.responseText == '') {
displayAjaxMessageAfterRedirect();
return;

0 comments on commit e39f618

Please sign in to comment.