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  zhex900 6 months ago.

  • Creator
    Topic
  • #34702

    zhex900
    Participant

    Hi,

    I am trying to add EventListener to UserType form. But this extension is not called. I don’t know why. I have added DependencyInjection. My custom validation group is working. Only buildForm is not called.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #34703

    Dmitriy Pasechnik
    Participant

    Hello zhex900
    Looks like the code is OK. It should work.
    How did you find out that ‘buildForm’ isnt called? I see that you added a listener on ‘submit’ event, so ‘file_put_contents’ should be called only when form is fully submitted, not when it just created.

    Also, if you want to do something with form data, when form is submitted – its better to use ‘FormEvents::PRE_SUBMIT’ event

    #34727

    zhex900
    Participant

    I found the problem. In DependencyInjection I gave the wrong name to the Extension file.

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

You must be logged in to reply to this topic.