Formalicious sending out duplicate emails

Hey all,

I have set up Formalicious on Modx 3 to create multiple custom forms . However, what I am noticing is that whenever an email is submitted, I am receiving 2 emails. The first email is the email chunk with the placeholders not being parsed. Example

Hi [[+first_name]], you have received an email.

and the second email is the email chunk that is parsed. Example

Hi John, you have received an email.

Does anyone have any idea as to why this is happening and how it can be fixed?

Is the call to Formalicious ([[!FormaliciousRenderForm? ...]]) maybe somehow nested in other MODX tags, so that the parser runs it twice?

Nope. It is in the coded directly in the template.

I did a test with a simple form (Formalicious 3.0.0-pl on MODX 3.0.3), but couldn’t reproduce the issue.
Is there something special about your form? Do you use multiple steps?

Is it possible the built-in modMail service is being invoked in addition to another mailer or mail API?

There are no multiple steps. I’m using (Formalicious 3.0.0-pl on MODX 3.0.2).

My code in the template

[[!FormaliciousRenderForm?
    &form=`[[*formalicious]]`
    &tplForm=`Form.chunk.tpl`
]]

and my tplForm code

[[!FormIt?
    [[!+FormItParameters]]
]]

<form action="[[!+currentUrl]]" id="form-[[!+id]]" method="POST" enctype="multipart/form-data" novalidate>
    [[!+formalicious.navigation]]
    [[!+formalicious.form]]

    <div class="form-pagination">
        [[!+step:neq=`1`:then=`<a href="[[!+prevUrl]]" class="btn btn--prev" title="[[%formalicious.prev? &namespace=`formalicious` &topic=`default`]]">
            [[%formalicious.prev? &namespace=`formalicious` &topic=`default`]]
        </a>`:else=``]]
        <button type="submit" class="btn btn--next" name="[[!+submitVar]]" value="[[!+submitVar]]" title="[[!+submitTitle]]">
            [[!+submitTitle]]
        </button>
    </div>
</form>

I am not sure. How can I check for this?

I tested it with your code and I still can’t reproduce the issue.

maybe check what the FormitParameters are

Your form appears to be reloading the same page. Is it possible that it’s sending the email each time? See if making the action load another page helps.