I have a survey that on button submit the first thing it runs in my js is validation if required fields are entered. Basically:
if (x == null) {
alert("You forgot to enter a required field!.");
return false;
};
Is there any way from preventing the page from refreshing/resetting what has previously been filled out if they forgot one required field?
This survey stores to local storage if that matters or can be used to help here.