Serialize form as json

This commit is contained in:
Austen Adler 2021-08-21 17:22:10 -04:00
parent afb57a17ff
commit 04bc783c09

View File

@ -77,9 +77,9 @@ function attach() {
console.log("Preventing");
e.preventDefault();
// Form serialization
let form = $(this).serialize();
// let form = $(this).serialize();
// JSON serialization
// let form = $(this)
let form = JSON.stringify($(this).serializeArray());
let event = submitElems[i].getAttribute('rust-submit');
send_event(SUBMIT_EVENT, event, form);
});