From a1f01b1bc2ceba062c55b46f1de6b38fd7e16070 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 15 Jan 2011 23:07:33 +0100 Subject: [PATCH] Disable all original input fields when form is submitted. This way only the generated input fields/textareas are submitted, and those always contain the real value. Fixes #46. --- src/main/resources/static/javascript/sone.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 80d039c..e0c8162 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -47,6 +47,7 @@ function registerInputTextareaSwap(inputElement, defaultText, inputFieldName, op textarea.show(); } $(inputField.get(0).form).submit(function() { + inputField.attr("disabled", "disabled"); if (!optional && (textarea.val() == "")) { return false; } -- 2.7.4