From 024e75754e459f8232759e32c5c062385a615453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Ma=C5=A1=C3=AD=C4=8Dek?= Date: Wed, 28 Oct 2020 20:36:34 +0100 Subject: [PATCH] Enable keep value after replicate Use attribute 'data-replicator-kee-value' on input for keep value after replicate --- src/assets/jquery.forms-replicator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/assets/jquery.forms-replicator.js b/src/assets/jquery.forms-replicator.js index 526f465..342fd33 100644 --- a/src/assets/jquery.forms-replicator.js +++ b/src/assets/jquery.forms-replicator.js @@ -184,7 +184,10 @@ } else if ($input.is('[type=submit]')) { } else { - $input.val(''); + let keepValue = $input.data('replicatorKeepValue'); + if (keepValue == undefined) { + $input.val(''); + } } }