# $event-\>addSubmitAction not working

**URL:** <https://forum.mautic.org/t/event-addsubmitaction-not-working/23345>\
**Category:** Development\
**Created:** [March 29, 2022, 8:24pm UTC](https://forum.mautic.org/t/event-addsubmitaction-not-working/23345 "2022-03-29T20:24:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NichMaia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nichmaia/32/6488_2.png) [@NichMaia](https://forum.mautic.org/u/NichMaia)\
**Post date:** [March 29, 2022, 8:24pm UTC](https://forum.mautic.org/t/event-addsubmitaction-not-working/23345/1 "2022-03-29T20:24:18Z")

</div>

Hi, I am trying to add an action to the Campaign form, through a plugin and using the following code:

```auto
public function onFormBuilder(FormBuilderEvent $event)
    {
        $event->addSubmitAction('actions.send.lead', [
            'group' => 'actions.form',
            'label' => 'actions.email.form.action.sendemail.lead',
            'description' => 'actions.email.form.action.sendemail.lead.descr',
            'formType' => ActionEmailSendType::class,
            'formTypeOptions' => ['update_select' => 'formaction_properties_email'],
            'formTheme' => 'MauticEmailBundle:FormTheme\EmailSendList',
            'eventName' => FormEvents::ON_EXECUTE_SUBMIT_ACTION,
            'allowCampaignForm' => true,
        ]);
  }

```

My event listener shows up in the debug, but this action doesn’t load, or displays any errors in the log. Can someone help me with this?
