Page 1 of 1

How to clean a form by code

Posted: Thu Jun 28, 2018 1:37 am
by wrsalasr
Hi,

Someone can tell me how I can clean by code when I entering or leaving a page, this is because I have my contact page with Editbox, text Area form, when I enters my data and press the submit button is changed the page, but I use the button of browser backspace and return to the previous page the data entered are still there, the ideal would be that pressing the submit button changes the page but and the forms are cleaned

Re: How to clean a form by code

Posted: Thu Jun 28, 2018 6:08 am
by Pablo
When you use the 'back' button then the browser will display the page form cache.
I am not sure if you can clear the form's content in that case.

But you can try by adding an (ondocumentready) event and the 'form reset' action.