OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions UserTypeExtension: buildForm Not Called

This topic contains 2 replies, has 2 voices, and was last updated by  zhex900 6 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
  • #25409

    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
  • #25410

    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

    #25411

    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)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top