Expand my Community achievements bar.

Message Box Issue

Avatar

Level 2

I've set up message boxes on my form to notify users when they do not enter information in the correct format.  This part works fine, the boxes are popping-up with the respective messages.  But, after the user clicks the "OK" button in the message box, it populates the field with the incorrectly entered text and then moves onto the next field.  I would like it so that once the user clicks "OK", it clears the incorrectly entered information and the cursor remains in the field so that the user can re-enter.  Is this a simple fix?  Thanks.

1 Reply

Avatar

Level 6

use following JS line to clear the field...

this.rawValue = "";

to set the focus to the same field use.........

xfa.host.setFocus("this.somExpression");

//or use

xfa.host.setFocus("xfa.form.form1.TextField1");