finnlesueurgmailcom - 2 weeks ago

Hey,

I've got multiple forms on a single web page (see https://canterburyplumbing.co.nz) and when, for example, the Quote form is submitted, the submission is duplicated and I receive two identical emails.

How can I stop this from occurring?

Thanks!

Answer

finnlesueurgmailcom - 2 weeks ago

Accidental duplicate of this question & answer: https://pyrocms.com/forum/channels/plugins/multiple-forms-on-single-page#comment-2425

ryanthompson - 2 weeks ago

Just set the prefix on the form like ...setOption('prefix', 'form_1_')...

finnlesueurgmailcom - 2 weeks ago

I tried to do this but it didn't seem to do anything like this when using it like this: {{ forms_display('contact').setOption("id", "contact_form")|raw }} because the form still just looks like:

<form method="POST" action="https://canterburyplumbing.co.nz" accept-charset="UTF-8" class="form" enctype="multipart/form-data">
...
</form>

Oh and {{ forms_display('contact').setOption("prefix", "contact_form")|raw }} doesn't seem to do anything either

finnlesueurgmailcom - 2 weeks ago

Accidental duplicate of this question & answer: https://pyrocms.com/forum/channels/plugins/multiple-forms-on-single-page#comment-2425