On Add --> Validate : Script Action Fail

On Add --> Validate : Script Action Fail

What I am trying to do is have an alert box pop up if a field value is null, but I only want this to happen once on validate and if the user decides this null field is ok then the user can submit again without having an alert box pop up.

Currently I am trying:

if ((input.Radio_1 = null) && (input.hiddenvalue != "nullcheck"))
{
    input.hiddenvalue = "nullcheck";
    alert "You have not completed the form are you sure you want to submit? To submit click ok then click submit again.";
    cancel submit;
}


BUT when you click submit the value "nullcheck" does not show up in the feild input.hiddenvalue thus the user keeps getting the alert box and can't submit.


Is there anyway to make this happen?