From fe9d17cd17c94c2dc20e0dcf4bbae6d4b2268e51 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 26 Aug 2021 14:57:18 +0200 Subject: [PATCH] Hide 'required' radio in preview mode --- www/form/inner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/form/inner.js b/www/form/inner.js index ecc4db7b5..3c3aca31b 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -2777,6 +2777,7 @@ define([ var $oldTag = $(data.tag); $(edit).show(); $(previewDiv).show(); + $(requiredDiv).hide(); $(editButtons).find('.cp-form-preview-button').remove(); @@ -2795,6 +2796,7 @@ define([ }; var onEdit = function (tmp) { data.editing = true; + $(requiredDiv).show(); $(previewDiv).hide(); $(data.tag).hide(); $(editContainer).append(data.edit(onSave, tmp, framework)); @@ -2806,6 +2808,7 @@ define([ $(edit).click(function () { onEdit(); }); + $(requiredDiv).hide(); // If we were editing this field, recover our unsaved changes if (temp && temp[uid]) {