Page 1 of 1
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 5:29 pm
by Mike6979865
Hi,
I create two pages. When I click on the form button from the start screen, I go to the page that has fill-able fields. I fill everything then click submit. Then I click on the HOME button to go back. When I click on the Form button again from the start screen, I want all values to reset. I tried full screen refresh upon entry, but it didn't work. I want to reset all values. Please help.
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 6:06 pm
by Kateryna Grynko
Hi Mike,
Could you please try using "full screen refresh" when navigate to another page?
Let us know about the result please.
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 6:46 pm
by Mike6979865
Hi Katya,
This is what I've been using. It doesn't clear the fields...
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 7:06 pm
by Oliver Fisk
I have a similar need. But for me it is clearing the local variables which populate the fields. I can clear them with individual events but it's quite a long process.
OP are you populating those fields from local variables?
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 8:08 pm
by Kateryna Grynko
Hi Oliver,
To clear input you can use:pre$("input").val("");/preIf you need to clear any other components let us know please.
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 8:47 pm
by Mike6979865
Hi,
I added the following under events:
Component: Form
Event: Load
Action: Run Javascript
and I added the coded that you just provided. I entered some text in the fields, and clicked on Home, and click on the button to go to the form again, and the text that i entered is still there.
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 9:20 pm
by Kateryna Grynko
Hi Mike,
Could you please try on Page Show event? Start screen is not reloaded when you return to it.
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 10:03 pm
by Mike6979865
Worked!
Also, how do I clear an image. In the camera tutorial, you have the image shows in photopreview. How do I clear the image once I go to that page?
Reset All Values on the Scnree Upon Page Entry
Posted: Tue Jul 15, 2014 11:18 pm
by Illya Stepanov
Hi Mike,
Please describe with details what you want to do?