From ce39afc64a073917d176b6ba9be8a2f42164e452 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 9 Oct 2023 14:54:12 +0200 Subject: [PATCH] Allow to override MultiChoice default value --- umap/static/umap/js/umap.forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index f3f022b2..198e6f28 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -733,7 +733,7 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({ fetch: function () { let value = (this.backup = this.toHTML()) if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) - value = this.default + value = typeof(this.options.default) !== 'undefined' ? this.options.default : this.default this.container.querySelector(`input[type="radio"][value="${value}"]`).checked = true },