ssossossosso

Forums

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

This topic contains 2 replies, has 2 voices, and was last updated by thinh2010 thinh2010 1 year ago.

  • Creator
    Topic
  • #22126
    thinh2010
    thinh2010
    Participant

    Hello everybody,

    I am a new guy with Oro Platform. Now I am using orocrm_task_bundle (https://github.com/orocrm/OroCRMTaskBundle) in my ORO platform.

    I want to add more fields on that. I already create a migration to do that. And now I must display it on the create / update task form. Normally it already appear on these forms. But I want to make some changes for new fields. So that I decided extends the TaskType form (OroCRM\Bundle\TaskBundle\Controller\TaskType).

    In my form type file, I already use getParent() function to make it extends from OroCRM\Bundle\TaskBundle\Controller\TaskType, and then in BuildForm() function I add the custom form field. but the platform cannot recognize.

    Do you guys know another way to extends the current Form, just extends, I don’t want replace it.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #22199
    Stepan Yudin
    Stepan Yudin
    Participant

    Why dont use Symfony’s Form Extensions?
    Symfony docs: How to Create a Form Type Extension

    FormExtension class looks like that:


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

    #22204
    thinh2010
    thinh2010
    Participant

    Thanks for your reply.

    If I use Form Type Extension, everywhere call this form type will be changed, I don’t want that.
    But I found another way. I extend the TaskController and then I override update function, where call to the Task Form Type. Here I change to the name of my own extends form.

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

You must be logged in to reply to this topic.