My goal: To get the user to complete the field before being able to move onto the next field.
My Javascript Code: OnBlur
f = getField(event.target.name)
if (f.value.length == 0)
{
f.setFocus()
//Optional Message - Comment out the next line to remove
app.alert("This field is required. Please enter a value.")
}
What happens:
- When the user tabs out of that field without completing it, the error message pops up. That is fine.
- However, the message gets stuck and user cannot bypass it by clicking "okay." If you click "okay" the dialog box stays up indefinitely.
My question:
How can I alter the code, or change the action option to give the user the option to fix or complete the field after clicking "okay" to bypass the error?