Check whether a form has been modified

J

JL Smith

Hello!

I'm trying to find some help on the topic of being able to check to
see if a text field in a form has been modified. My form has three
buttons: 'Modify', 'Cancel', and 'Continue'. The user can modify,
cancel, or continue with the data on the form. If they modify ANY
text field on the form and they click the 'Continue' button, I want to
popup a confirmation that says something to the effect of "Do you want
to save your changes?".

Is there a way I can use the onChange() event for the text fields to
set a hidden value called "modified" to 1 if any text field is
changed? That way when they click 'Continue' and it fires my
isModified() function, I can check against this "modified" variable to
determine whether the form has been modified or not? Will that work?

Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top