Hello,
I have searched this site for an answer to my problem and I have found numerous similar solutions, but none of them are working for me. I need to alert the user with a message and highlight the fields which are empty when the submit button (which is really an update) is clicked. Here is the code I found. There is a function which accompany this code. Thank you
xfa.sourceSet.WrkComp.update()
// Database control button >> update the current record with any changes.
var okToSumbit = true;
for (var j = 0; j < this.numFields; j++)
{
var fieldname =
this.getNthFieldName(j);
var theField = this.getField(fieldname);
if (theField.type != 'text')
continue;
var valid = checkField( theField );
if (!valid)
{
okToSubmit = False
break;
xfa.host.messageBox("Your application has been submitted. Please print a copy for your records. There is no need to save the form. It has been saved to the database.THANK YOU!!", "Workers Comp Form Submitted", 3, 0);
George