<p>I believe the issue here is most likely that you just need to add the <code>modifyForm</code> hook to your custom templates. All the Captchas look for that hook and output the necessary hidden input fields and javascript that they need to do their thing when the form loads.</p>

<p>You can see how we include the <code>modifyForm</code> hook in the <a href="https://github.com/barrelstrength/craft-sprout-forms/blob/v2.6.4/templates/_special/templates/form.html#L31" rel="nofollow noreferrer">default templates</a>. It can be added anywhere within the  tags.</p>

CC BY-SA 4.0
2019-11-20T23:39:55.973Z
Adding the hook modifyForm tag renders another similar, but unique, set of Invisible Captcha fields. Should both the modifyForm hook, and sproutInvisibleCaptcha.protect() be on the same form?
ponies
CC BY-SA 4.0
2019-11-20T17:12:04.513Z
2019-11-20T17:12:04.513Z
Ben Parizek
<p>We're seeing duplicate submissions.  It's between 2 - 15 of the same submissions, usually 7. They come in irregularly over the next couple minutes after the first one. And only sometimes. They are all distinct in the database, and seem like copies of a legitimate user submission.</p>

<p>Does this sound like a known issue? What's the best way to approach troubleshooting this?</p>

<p>--- Update 19/11/2019 ---</p>

<p>Duplicate form submission protection through Invisible Captcha is enabled.</p>

<p>I'm using custom form templates with: </p>

<pre><code>  {{ getCsrfInput() }}
  {{ craft.sproutInvisibleCaptcha.protect() }}
</code></pre>

<p>But not</p>

<pre><code>  {% hook 'sproutForms.modifyForm' %}
</code></pre>

<p>--- Update 25/11/2019 ---</p>

<p>Setting the required time on form to 15 seconds, disabling the <code>Enable Sprout Forms Protection</code> option which automatically adds Invisible Captcha support for all Sprout Forms using the <code>craft.sproutForms.displayForm()</code> tag, removing <code>{% hook 'sproutForms.modifyForm' %}</code>, and keeping <code>{{ getCsrfInput() }}{{ craft.sproutInvisibleCaptcha.protect() }}</code>, allowed a submission to be recorded 13 times over the course of 2 minutes.</p>

<p>--- Update 27/11/2019 ---</p>

<p>The duplicate submissions came from from another, unprotected, instance of the form with it's own template. It submits without loading the redirect URL, clearing the form, or presenting any messages, leaving the user to click the button multiple times.</p>

CC BY-SA 4.0
2019-11-15T11:36:44.137Z
In the `Settings->Spam Protection`, do you have the Duplicate Captcha enabled? If so, have you overridden the provided Form Templates with custom templates? If so, do your custom Form Templates have following line in the templates: `{% hook 'sproutForms.modifyForm' %}`?
Ben Parizek
<plugin-sproutforms><craft2>
Receiving duplicate Sprout Form submissions
# Receiving duplicate Sprout Form submissions

(Asked by: username_0 on 2019-11-15)

We're seeing duplicate submissions.  It's between 2 - 15 of the same submissions, usually 7. They come in irregularly over the next couple minutes after the first one. And only sometimes. They are all distinct in the database, and seem like copies of a legitimate user submission.
Does this sound like a known issue? What's the best way to approach troubleshooting this?
--- Update 19/11/2019 ---
Duplicate form submission protection through Invisible Captcha is enabled.
I'm using custom form templates with: 
  {{ getCsrfInput() }}
  {{ craft.sproutInvisibleCaptcha.protect() }}

But not
  {% hook 'sproutForms.modifyForm' %}

--- Update 25/11/2019 ---
Setting the required time on form to 15 seconds, disabling the Enable Sprout Forms Protection option which automatically adds Invisible Captcha support for all Sprout Forms using the craft.sproutForms.displayForm() tag, removing {% hook 'sproutForms.modifyForm' %}, and keeping {{ getCsrfInput() }}{{ craft.sproutInvisibleCaptcha.protect() }}, allowed a submission to be recorded 13 times over the course of 2 minutes.
--- Update 27/11/2019 ---
The duplicate submissions came from from another, unprotected, instance of the form with it's own template. It submits without loading the redirect URL, clearing the form, or presenting any messages, leaving the user to click the button multiple times.

**Tags:** plugin-sproutforms, craft2

> **Comments:**
> **username_1**: In the `Settings->Spam Protection`, do you have the Duplicate Captcha enabled? If so, have you overridden the provided Form Templates with custom templates? If so, do your custom Form Templates have following line in the templates: `{% hook 'sproutForms.modifyForm' %}`?  

---

## 1 answers

### Answer by username_1 on 2019-11-20. Score: 1

I believe the issue here is most likely that you just need to add the `modifyForm` hook to your custom templates. All the Captchas look for that hook and output the necessary hidden input fields and javascript that they need to do their thing when the form loads.

You can see how we include the `modifyForm` hook in the [default templates](https://github.com/barrelstrength/craft-sprout-forms/blob/v2.6.4/templates/_special/templates/form.html#L31). It can be added anywhere within the tags.

> **Comments:**
> **username_0**: Adding the hook modifyForm tag renders another similar, but unique, set of Invisible Captcha fields. Should both the modifyForm hook, and sproutInvisibleCaptcha.protect() be on the same form?  

---

