OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions creating dynamic form – adding rows

This topic contains 6 replies, has 3 voices, and was last updated by  Alexandr Smaga 9 years, 10 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
  • #35739

    Kamil
    Participant

    Hi,
    is there any way already done in oro to make a dynamic form?
    it wouldn’t be a representation of database
    rather a dynamic form containing dropdown, 2 text fields,
    you could by pressing a button add another row with such things finally generating a “report”

    is there such a sample already existing?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #35740

    Dima Soroka
    Keymaster

    Forms management is not supported yet, we have this item in our backlog and some features should be available this year.

    #35741

    Alexandr Smaga
    Participant

    Hello. Do you mean something like a collection of rows ? Something like we have there for addresses, emails etc?

    #35742

    Kamil
    Participant

    yes Alexandr something like this, thanks!

    #35743

    Alexandr Smaga
    Participant

    Welcome! If you will have some question, feel free to ask it here.

    #35744

    Kamil
    Participant

    I was looking throught the link you have showed, digged a bit around “dynamic forms” in symphony.
    As I see it, I need to use collections.

    If you could guide me how to recreate the address on the right side, where I can add another instance of the same “form”. Cause basically what I want to do is to have a form that I can extend with another identical form below the first one.

    I tried looking through vendor\oro\crm\src\OroCRM\Bundle\ContactBundle\
    but I’m not sure where to look. I tried to search for few parameters but only unit test came up.

    #35745

    Alexandr Smaga
    Participant

    I’m not sure that your question is clear for me. But let me try!

    So basically your main form should be inherited from oro_collection form type. There is some explanation about form type inheritance.
    For example our contact’s addresses also inherited from collection form type, see there.
    Controller should be a little bit different from regular one due to you should use array collection as form data, and after form submit you need to persist each item manually one by one.

    Hope this information will help you!

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

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

Back to top