This topic contains 0 replies, has 1 voice, and was last updated by adriwan_kenoby 5 years, 10 months ago.
- Topic
Hi Oro Team,
I have an operation define in actions.yml. This one use a dynamic form, my problemn is that the variable
$.form
used in actions.yml doesn’t contain the good values due to dynamic field.123456789101112131415161718192021222324252627282930313233343536373839404142434445container_restore:label: sinabs.hosting.container.widgets.restoreroutes:- sinabs_container_viewacl_resource: [UPDATE, entity:Sinabs\Bundle\HostingBundle\Entity\Container]button_options:icon: fa-window-restoreclass: btnpreconditions:'@not_equal': [$backupedAt, null]frontend_options:template: SinabsHostingBundle:Action:restore.html.twigtitle: sinabs.hosting.container.widgets.restoreoptions:width: 550modal: falsestateEnabled: falseincrementalPosition: falseallowMaximize: trueallowMinimize: truedblclick: maximizemaximizedHeightDecreaseBy: minimize-barattributes:restore:label: 'Restoration Point'type: entityoptions:class: Sinabs\Bundle\HostingBundle\Form\Model\RestoreTypeModelform_options:attribute_fields:restore:form_type: Sinabs\Bundle\HostingBundle\Form\Type\RestoreTypeoptions:container: $.dataactions:- '@call_service_method':service: sinabs.handler.container_restoremethod: processmethod_parameters: [$.data, $.form]- '@flash_message':message: sinabs.hosting.container.widgets.restore_save_successtype: 'success'The templates:
12345678910111213141516171819202122232425262728293031323334353637{% extends 'OroActionBundle:Operation:form.html.twig' %}{% block form %}{% set buttonOptions = operation.definition.buttonOptions %}{% set pageComponentOptions = {} %}<div class="widget-content">{% set attr = {'id': form.vars.id, 'data-collect': 'true', 'class': 'form-dialog'} %}{% if buttonOptions.page_component_module is defined %}{% set attr = attr|merge({'data-page-component-module': buttonOptions.page_component_module}) %}{% endif %}{{ form_start(form, {'action': app.request.uri, 'attr': attr}) }}{% set options = form.vars.options|default({})|merge({'route': "sinabs_hosting_change_restore_type",'container': form.restore.vars.container.id}) %}<div data-page-component-module="sinabshosting/js/app/components/restore-type-component"data-page-component-options="{{ options|json_encode }}">{{ form_widget(form.restore) }}</div><div class="hidden">{{ form_rest(form) }}</div><div class="widget-actions"><button type="reset" class="btn">{{ 'Cancel'|trans }}</button><button type="submit" class="btn btn-success">{{ 'Submit'|trans }}</button></div>{{ form_end(form) }}{{ oro_form_js_validation(form) }}</div>{% endblock %}1234{{ form_row(form.backup) }}{{ form_row(form.filename) }}How keep the consistency of my form ?
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.