0

I use the last modx revo with formZ and it duplicates emails. Each time I submit the form I receive the email twice. I can't figure it out. Here is my form tpl:

[[!FormIt?
    &hooks=`[[+action]][[+hooks:notempty=`,[[+hooks]]`]]`
    &excludeFields=`submit[[+id]]`
    &submitVar=`submit[[+id]]`
    &formid=`[[+id]]` [[- "Form ID"]]
    &store=`0`
    &storeTime=`900`
    &successMessage=`<p>[[+success_message]]</p>`
    &emailTo=`[[+email:default=``]]`
    [[+properties]]
    [[+validation:notempty=`&validate=`[[+validation]]``]]
    [[+validationText:notempty=`[[+validationText]]`]]
]]

[[!+fi.successMessage]]
[[!+fi.validation_error_message]]

<form class="form [[+identifier]]" action="" method="post">
    <fieldset>
        [[+fields]] 
    </fieldset>

    <div class="actions">
        <input type="submit" name="submit[[+id]]" value="[[+action_button:default=`Envoyer`]]" class="btn primary" />
    </div>
</form>

How to avoid duplicating emails? Any ideas?

curveball
  • 4,320
  • 15
  • 39
  • 49
Sylvain Le Bihan
  • 163
  • 1
  • 2
  • 13

1 Answers1

1

Do you use multiple forms on the same page? Or maybe you use conditional calls? Something like: [[*someTV:is='12':then='[[!fomz]]':else='']]

(Note that the '' should be ``! Just can't use them here.) If so, have a gander at this.

It helped me, although I used [[If]] and made only one call. Basically I used the [[*formzTV]] call as it is and voilà. One mail, just as it should be.

skrrgwasme
  • 9,358
  • 11
  • 54
  • 84
Lucas Venturini
  • 171
  • 1
  • 10
  • Please try to clean up your answers a little bit. You don't need the "lol" and "hope this helps" comments. If you're unsure whether your answer is applicable, you should ask clarifying questions as comments *before answering* to keep your answers concise. – skrrgwasme Jul 28 '14 at 20:29