Skip to content

Commit

Permalink
fix(condition): add condition on not-yet-created item
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Mar 17, 2022
1 parent 0c624e7 commit 257a41e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion templates/components/form/condition.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
'rand': random(),
'width': '100%',
} %}
{% set parent = get_item(condition.fields['itemtype'], condition.fields['items_id']) %}
{% set excludeQuestions = call('PluginFormcreatorCondition::getQuestionsExclusion', [parent]) %}
{% set form = call('PluginFormcreatorForm::getByItem', [parent]) %}
{% set field %}
Expand Down
1 change: 1 addition & 0 deletions templates/pages/question.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
{{ fields.smallTitle(__('Condition to show the section', 'formcreator')) }}

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

0 comments on commit 257a41e

Please sign in to comment.