{% if savedId is defined and savedId %} {% set widgetResponse = { widget: { trigger: [{ eventBroker: 'widget', name: 'formSave', args: [savedId] }], } } %} {{ widgetResponse|json_encode|raw }} {% else %}