Clear Web Form Contents

User 2836110 Photo


Registered User
109 posts

Is there an easy way to clear/refresh a form after the SUBMIT button is pressed ??
I don't want the client using their Browser Back button and seeing a previously filled in form.
I want them to start with a blank form.
Thank you
User 2699991 Photo


Registered User
4,734 posts
Online Now

Lou Mitsy wrote:
Is there an easy way to clear/refresh a form after the SUBMIT button is pressed ??
I don't want the client using their Browser Back button and seeing a previously filled in form.
I want them to start with a blank form.
Thank you


where are you displaying the form?
(IE manually exporting to a webpage, or publishing to Sdrive)
where are you sending the people to when they hit the send button? (IE to a custom confirmation page ot just displaying the default confirmation page?
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://mawarputih.coffeecup.com/forms/prove-human/
User 2699991 Photo


Registered User
4,734 posts
Online Now

Wayan Jaya wrote:
Lou Mitsy wrote:
Is there an easy way to clear/refresh a form after the SUBMIT button is pressed ??
I don't want the client using their Browser Back button and seeing a previously filled in form.
I want them to start with a blank form.
Thank you


where are you displaying the form?
(IE manually exporting to a webpage, or publishing to Sdrive)
where are you sending the people to when they hit the send button? (IE to a custom confirmation page ot just displaying the default confirmation page?


mind you its not that easy, but not so difficult whichever way, and will require some trickery boo
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://mawarputih.coffeecup.com/forms/prove-human/
User 2836110 Photo


Registered User
109 posts

Sorry i should have mention those details,
I am manually exporting the form and using the default confirmation page with the following change:
<FORM><INPUT Type="button" VALUE=" Go Back" onClick="history.go(-1);return true;">
User 187934 Photo


Senior Advisor
20,161 posts

Yes there is a way.
Here's one way. Put this code in an HTML Element at the top of your form within the Form Builder.
<script>window.addEventListener( "pageshow", function ( event ) {
var historyTraversal = event.persisted ||
( typeof window.performance != "undefined" &&
window.performance.navigation.type === 2 );
if ( historyTraversal ) {
window.location.reload();
}
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

Thanks Eric,

I will give it a try now and let you know how it goes.

LOU
User 2836110 Photo


Registered User
109 posts

Success as always Eric,

The issue was only with Safari all the other browsers would refresh the form using the go back code
in my form confirmation page.
Your script fixes the Safari problem beautifully.

Thanks again.
User 187934 Photo


Senior Advisor
20,161 posts

You're welcome. :cool:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.