Expand my Community achievements bar.

Form Validation and Set Focus function

Avatar

Level 2

Hello,  I have the following script at MouseEnter

 

Page1.execValidate();

However, when a field fails validation the Set Focus does not move to the 1st failed field.

What am i missing?

Kind regards

4 Replies

Avatar

Level 4

Not quite sure what your validation is, but I prefer to use the Action Builder. I just set a condition of a field "is not" and then in the result section use "Set Focus" to and select whatever field you want. Depnding on the type of field (text field, numeric or date) you get a different set of validation parameters. For example if your field is a numeric field you can select things like "is greater than", "is not" whereas a text field only has things like "is not" or "is empty". I usually suggest that because it takes out the issue of incorrect Javascripting or other coding issues and breaks it down to the simplest functions. However without knowing the type of field you are using and what the validation you are running it is hard to figure out what the issue is.

Avatar

Level 2

I am just doing a basic validation for data, but when it fails at signature field.  THe focus doesn't go to the 1st failed field which in my case would be data opened.

required fields set focus.JPG

Avatar

Level 9

Where have you written the execValidate() function? In the MouseEnter event of every field?

Avatar

Level 2

No, just in the mouseenter of a the signature field not shown.