Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

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 4 years, 4 months ago.

  • 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
    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)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for marketplace.orocrm.com