メールフォームからのメールが2回送信される A mail is sent twice from the mail form

メールフォーム{{form}}を使用して送信後、「送信完了」画面でブラウザをリロードすると画面が切り替わらずもう一度メールが送信されてしまいます。改善する方法はありますか?

When a browser is renewed on the “sending, completing” screen after a transmission using the mail form {{form}}, a screen isn’t switched over, and a mail is sent again. Is there a way to improve?

1 Like

Oh great finding @rie05

Hmmmm… maybe the best way is redirect user to a “thank you” page after form submission?

If that is ok, try this tutorial:

http://help.pulsecms.com/article/19-form


Redirect on form success

Sometimes you may want to redirect to another page after form successfully completed.

  1. Make a new file in tags called “redirect.php”
  2. In that file add:
<?php
if(isset($_POST['submit'])){
//  To redirect form on a particular page
header("Location:https://www.yoursite.com/thankyou.html");
}
// Change this part from above to your "success page" absolute URL 
https://www.yoursite.com/thankyou.html
  1. Change line 72 in form.php to:

<form id="contact" method="post" action="inc/tags/redirect.php" >

Let me know how that is! :slight_smile:

1 Like

Done.
Refresh you not to an email.

1 Like

This topic was automatically closed after 12 hours. New replies are no longer allowed.