From 8fae26b0da3bf35a01ea6427704bd7d9d07ea3da Mon Sep 17 00:00:00 2001 From: Zuzanna Date: Thu, 2 Oct 2025 15:44:14 +0200 Subject: [PATCH] can add other question types within section --- www/form/inner.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/form/inner.js b/www/form/inner.js index 7941f0d5b..2e4e18670 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -3849,7 +3849,7 @@ define([ if (!APP.isEditor) { return; } var full = !uid; var addControl = function (type) { - if (type === "section" && inSection) { return; } + if (type === "section" && (uid && !content.order.includes(uid) || uid && inSection) ) { return; } var btn = h('button.btn.btn-secondary', { title: full ? '' : Messages['form_type_'+type], @@ -3943,8 +3943,7 @@ define([ $container.find('.cp-form-block:not(.cp-form-submit-message)').each(function (i, el) { var $el = $(el); var uid = $el.attr('data-id'); - var inSection = !content.order.includes(uid); - $el.before(getFormCreator(uid, inSection)); + $el.before(getFormCreator(uid)); }); // Add to the end of a section $container.find('.cp-form-section-sortable').each(function (i, el) {