From 04bc783c093e6f962e0ee49421576a66122bd48f Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 21 Aug 2021 17:22:10 -0400 Subject: [PATCH] Serialize form as json --- liveview-rust/js/liveview-dev.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liveview-rust/js/liveview-dev.js b/liveview-rust/js/liveview-dev.js index dd2c4f8..4fde369 100644 --- a/liveview-rust/js/liveview-dev.js +++ b/liveview-rust/js/liveview-dev.js @@ -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); });