ssossossosso

Forums

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

This topic contains 6 replies, has 3 voices, and was last updated by  Alexandr Smaga 3 years, 1 month ago.

  • Creator
    Topic
  • #4326

    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
  • #4340
    Dima Soroka
    Dima Soroka
    Oro Core

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

    #4341

    Alexandr Smaga
    Participant

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

    #4343

    Kamil
    Participant

    yes Alexandr something like this, thanks!

    #4364

    Alexandr Smaga
    Participant

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

    #4365

    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.

    #4409

    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)

You must be logged in to reply to this topic.