ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #20694
    Stepan Yudin
    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
  • #20770
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    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.

    #22197
    Stepan Yudin
    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

    #22201
    Stepan Yudin
    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)

You must be logged in to reply to this topic.