After clicking on the Add New Contact icon, the app takes me to the Add New Contact Panel. If I click on the Cancel button, the application pulls up a message that reads "The data entered will be lost, Continue Y/N". This message should only come up if the user has already entered data in the form. Currently, the application is pulling up this message even if the form is empty.

You need to explain further and show code. So far it seems as if there is just a bad code for testing the forms validity. You will need to do a simple if else statement or a loop through form elements that will set a boolean true or false if the form has information or not. Code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.