OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How can i render entity form in dialog window widget?

This topic contains 3 replies, has 2 voices, and was last updated by  Stepan Yudin 7 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36255

    Stepan Yudin
    Participant

    Good day everyone!

    I want to implement entity creation trough a modal window. Like ‘oro_entity_create_or_select_inline’ form type but only with create button.
    I saw a “Add address” implementation, but its really hard for me. Im not familiar with Backbone and i really dont want to implement JS Model/View and REST API for every entity i want to create in modal window.

    Finally, i want to create a button, that opens modal window and renders form by my_entity_create route passed.
    And it would be great if i can call some callback after this form was submitted.

    Is there any ways to implement it ‘out of the box’?

    Many thanks!


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #36256

    Yevhen Shyshkin
    Participant

    Hello.

    Look at contact select form as an example https://github.com/laboro/crm/blob/master/src/OroCRM/Bundle/ContactBundle/Form/Type/ContactSelectType.php – it defines route for create form type and that’s all. If you want to add some additional actions you can do that in your create controller action accessible by the defined route.

    #36257

    Stepan Yudin
    Participant

    Hello, Yevhen, pardon me for huge delay.

    Thank you, i’ve looked this code.
    I implemented this a little easier, in fact i’ve just pass my route via fronntend routing component to DialogWidget and use special handler to close widget window after form was succesfully submitted.

    The simplified code looks like:


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

    #36258

    Stepan Yudin
    Participant

    Resolved


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top