Mandatory Fields
I have three form text fields that need to be completed before the form is submitted (Submit button).
I have checked Required on each text box
I have added the javascript to each of the Required fields (Actions -> Mouse Up - Run a JavaScript)
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.")
}
When I Preview the form and click into the Required field, the alert is displayed but the cursor point doesnt stay in that field. When I tab the next field is displayed.
I need the alert to display but the cursor to stay in that field so it can be filled.
Its probably somethng small that I am missing. Help would be appreciated.