#110493Bug: Form wizard always selects first template regardless of Blank/Predefined mode
Description
When creating a new form via the backend form wizard, the settings-step.js always selects the first configured template (templates0) in setPrototype(), regardless of whether the editor chose “Blank” or “Predefined” mode in the previous step.
Steps to reproduce:
1. Open Web > Forms
2. Click “Create new form“
3. Select “Blank” mode
4. In step 2 (settings), the prototype dropdown changes or a different
prototype is selected
5. The template dropdown is set to the first template in the list, even
if it is not the blank form template
Expected behaviour:
- If mode is “Blank”, the template should be the blank form (BlankForm.yaml
or equivalent).
- If mode is “Predefined”, the template should be the first non-blank template.
Actual behaviour:
setPrototype() in Resources/Public/JavaScript/backend/form-wizard/steps/settings-step.js
always picks templates0:
setPrototype(e){const a=this.context.formManager.getTemplatesForPrototype(e);this.setValue({prototype:e,template:a0?.value??”“})}
The MODE import from mode-step.js is available but unused. There is no logic to synchronise the selected template with the wizard mode chosen in step 1.
Impact:
Editors who select “Blank” may end up with a predefined form if the blank template is not the first in the YAML array. The outcome depends on the array order of yamlConfigurations, making the wizard behaviour inconsistent.
Suggested fix:
Add a getTemplateForMode(prototype, mode) method that returns the blank template when mode is Blank, and the first non-blank template otherwise. Call this from setPrototype() and from render() to re-synchronise when the mode changes between steps.
Reviews 2
History 37
-
Maike Kiebele changed assigned to Maike Kiebele <span data-processor="relativetime" data-value="2026-08-19T14:44:07+00:00" > 08/19/26, 14:44 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 95375 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-21T10:37:31+00:00" > 08/21/26, 10:37 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95375 <span data-processor="relativetime" data-value="2026-08-24T09:06:49+00:00" > 08/24/26, 09:06 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95411 <span data-processor="relativetime" data-value="2026-08-25T10:45:38+00:00" > 08/25/26, 10:45 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 95411 <span data-processor="relativetime" data-value="2026-08-25T11:18:22+00:00" > 08/25/26, 11:18 </span>
-
Maike Kiebele commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-08-25T11:30:11+00:00" > 08/25/26, 11:30 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-09-08T10:02:54+00:00" > 09/08/26, 10:02 </span>
Applied in changeset commit:fc0b542e5248e565d2a7176e6cb1eed550a31dab.