Skip to main content
Known Participant
December 17, 2017
解決済み

PHP Form Mail retains filled page after sending, behind the "Thank You" page...

  • December 17, 2017
  • 返信数 1.
  • 1117 ビュー

PHP Form Mail, on complete and send, opens the "Message Sent" Thank You page, but when click/swipe back, has also retained the just sent form, fully completed, requiring one to also click/swipe back though two pages to return to main site.

Note: This isn't a problem with receiving multiple mail receipts, but of clearing the initial form on receiving the completion notification page.

Mail delivery works as expected. (The following contact page accessed through the nav menu, not directly.

satgraphics.com  select "contact"

    このトピックへの返信は締め切られました。
    解決に役立った回答 Nancy OShea

    Yes, it's true that the field clears; However, if you then try to return to the page from which the visitor came from, there will be behind the fully filled out form... just as it was when the submit button was clicked.

    Note content of initial query:

    PHP Form Mail, on complete and send, opens the "Message Sent" Thank You page, but when click/swipe back, has also retained the just sent form, fully completed, requiring one to also click/swipe back though two pages to return to main site.

    In this case, the Thank you message is on the same page as your form.  It's not separate.  If you want a separate success/error page, you'll need to use a different script.

    I'm not sure why people would hit the BACK button after submitting a form.  Most people would close it.

    Nancy

    返信数 1

    Nancy OShea
    Community Expert
    Community Expert
    December 17, 2017

    You can clear form input fields on submit with JavaScript.

    Nancy O'Shea— Product User & Community Expert
    Known Participant
    December 18, 2017

    Nancy,

    I set an ID and inserted js, but still getting same results.

    Inserted at end of form... </form>

        <script>

    function myFunction() {

        document.getElementById("SatForm").reset();

    }

    </script>

    Known Participant
    December 18, 2017

    Clear your browser's  cache and try again.

    If I type something in the name field and hit SUBMIT, the placeholder text shows but the input value is gone.


    Yes, it's true that the field clears; However, if you then try to return to the page from which the visitor came from, there will be behind the fully filled out form... just as it was when the submit button was clicked.

    Note content of initial query:

    PHP Form Mail, on complete and send, opens the "Message Sent" Thank You page, but when click/swipe back, has also retained the just sent form, fully completed, requiring one to also click/swipe back though two pages to return to main site.