Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/formidable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ function frmFrontFormJS() {

showSubmitLoading( jQuery( object ) );

frmFrontForm.submitFormNow( object, classList );
frmFrontForm.submitFormNow( object );
}
},

Expand Down
8 changes: 6 additions & 2 deletions square/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@
const formData = new FormData( thisForm );
formData.append( 'action', 'frm_verify_buyer' );
formData.append( 'nonce', frmSquareVars.nonce );

// Remove a few fields so form validation does not incorrectly trigger.
formData.delete( 'frm_action' );
formData.delete( 'form_key' );
formData.delete( 'item_key' );

const response = await fetch( frmSquareVars.ajax, {
method: 'POST',
body: formData
Expand Down Expand Up @@ -254,8 +260,6 @@
return;
}

event.preventDefault();

// Increment running counter and disable the submit button
running++;
if ( thisForm ) {
Expand Down
Loading