Kevin
Posts: 0
Joined: Sun Oct 07, 2012 7:58 pm

Clear previously entered text on input fields.

I have a screen with a form. When a user fills the form and goes to another screen then later come back to that screen they find the values they had entered previously.

So they have to start deleting each field and fill in new values.

How can I make the form input fields empty whenever the user comes back to the form?

Kevin
Posts: 0
Joined: Sun Oct 07, 2012 7:58 pm

Clear previously entered text on input fields.

Any Help with this?

Eric5020946
Posts: 0
Joined: Tue Sep 18, 2012 4:31 pm

Clear previously entered text on input fields.

create local storage variable to track last visited page and update this variable when user goes to new page

on your page with form check if last_visited_page variable equals current page, if not reset all values in the form

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Clear previously entered text on input fields.

I'm still not clear on this, I am using the attached code. How do I change or implement this code correctly to clear the input fields, and reset the element values back to their default?

Clear input field "inputTest" with JS:
Apperyio("inputTest").val();

Delete elements that were created by service:
Apperyio("elementName").remove();

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Clear previously entered text on input fields.

Hi, I tried it and it still didn't work.. This is what I put: Appery("Incident").find("input[type=text]").val("");

-- My screen name is 'Incident', and that is all that I changed. Any other ideas?

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Clear previously entered text on input fields.

I placed it on the Page component on page load. Is that the right place to put it?

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Clear previously entered text on input fields.

Hi, I tried it and it still didn't work.. This is what I put: Appery("Incident").find("input[type=text]").val("");

-- My screen name is 'Incident', and that is all that I changed. Any other ideas?
I placed it on the Page component on page load. Is that the right place to put it?

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Clear previously entered text on input fields.

Hey, does anyone have any ideas??

I tried it and it still didn't work.. This is what I put: Appery("Incident").find("input[type=text]").val("");

-- My screen name is 'Incident', and that is all that I changed. Any other ideas?
I placed it on the Page component on page load. Is that the right place to put it?

Return to “Issues”