diff --git a/src/openforms/forms/models/form_variable.py b/src/openforms/forms/models/form_variable.py index 7c94fd7297..5e7b909a8f 100644 --- a/src/openforms/forms/models/form_variable.py +++ b/src/openforms/forms/models/form_variable.py @@ -60,7 +60,7 @@ def create_for_formstep(self, form_step: "FormStep") -> list["FormVariable"]: ): if ( is_layout_component(component) - or component["type"] == "content" + or component["type"] in ("content", "softRequiredErrors") or component["key"] in existing_form_variables_keys or component_in_editgrid(form_definition_configuration, component) ): diff --git a/src/openforms/js/components/admin/form_design/variables/utils.js b/src/openforms/js/components/admin/form_design/variables/utils.js index d689b180c3..393e75cf49 100644 --- a/src/openforms/js/components/admin/form_design/variables/utils.js +++ b/src/openforms/js/components/admin/form_design/variables/utils.js @@ -60,6 +60,9 @@ const makeNewVariableFromComponent = (component, formDefinition) => { const shouldNotUpdateVariables = (newComponent, oldComponent, mutationType, stepConfiguration) => { // Issue #1695: content components are not considered layout components if (newComponent.type === 'content') return true; + // Issue #4884 - soft required errors are pretty much the same as content components, + // with additional special client-side behaviour + if (newComponent.type === 'softRequiredErrors') return true; const isLayout = FormioUtils.isLayoutComponent(newComponent); @@ -84,9 +87,10 @@ const shouldNotUpdateVariables = (newComponent, oldComponent, mutationType, step const getFormVariables = (formDefinition, configuration) => { const newFormVariables = []; - FormioUtils.eachComponent(configuration.components, component => - newFormVariables.push(makeNewVariableFromComponent(component, formDefinition)) - ); + FormioUtils.eachComponent(configuration.components, component => { + if (component.type === 'softRequiredErrors') return; + newFormVariables.push(makeNewVariableFromComponent(component, formDefinition)); + }); return newFormVariables; };