Skip to content

Commit 257a41e

Browse files
committed
fix(condition): add condition on not-yet-created item
1 parent 0c624e7 commit 257a41e

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

templates/components/form/condition.html.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
'rand': random(),
5656
'width': '100%',
5757
} %}
58-
{% set parent = get_item(condition.fields['itemtype'], condition.fields['items_id']) %}
5958
{% set excludeQuestions = call('PluginFormcreatorCondition::getQuestionsExclusion', [parent]) %}
6059
{% set form = call('PluginFormcreatorForm::getByItem', [parent]) %}
6160
{% set field %}

templates/pages/question.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
{{ fields.smallTitle(__('Condition to show the section', 'formcreator')) }}
104104

105105
{{ fields.dropdownArrayField('show_rule', item.fields['show_rule'], item.getEnumShowrule(), '', { 'no_label': true, 'on_change': 'plugin_formcreator_toggleCondition(this);' }) }}
106+
{% set parent = item %}
106107
{% set conditions = call('PluginFormcreatorCondition::getConditionsFromItem', [item]) %}
107108
{% for condition in conditions %}
108109
{{ include('@formcreator/components/form/condition.html.twig') }}

0 commit comments

Comments
 (0)