Form Module: Multiple Forms on Single Page
Created 6 years ago by finnito

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!

finnito  —  6 years ago Best Answer
ryanthompson  —  6 years ago

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

finnito  —  6 years 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

finnito  —  6 years ago Best Answer