Problem with full event seems like a bug

Avatar

Avatar

Saida_Rao_Gampa

Avatar

Saida_Rao_Gampa

Saida_Rao_Gampa

16-03-2015

Hi,

I had a requirement like this, there are two text fields say Textfield1 and Textfield2 and if Textfield1 is full it should automatically go to textfield2 and fill the characters typed from the keyboard. I  had implemented this by using full event. If  Textfield1 is full change focus to Textfield2.

Now I have come across very strange issue i.e., the last character that I enter in Textfield1 is not going to Textfield2. Its because full event is triggered at the key in of the last character.

Tried other alternatives didnt work.

Guys, Now I dont understand is this correct. Anybody came across the same issue.

Thanks for all you do.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Saida_Rao_Gampa

Avatar

Saida_Rao_Gampa

Saida_Rao_Gampa

19-03-2015

Yes I used this script

xfa.host.setFocus("TextField2");   in my full event. However I was able to resolve the issue by using newText and limiting the length to 50.

Now I come across a different issue i.e., it doesnt work if I enter all uppercase letters in the TextField1.

Reason being the characters count differ for uppercase and lowercase. Not sure how to handle this.

Also, I expect full event can be a solution in this case, however If I use full event and change the focus to new textfield the last key stroke gets lost.

Any help on this would be highly appreciated..

Answers (1)

Answers (1)

Avatar

Avatar

jasotastic81

Avatar

jasotastic81

jasotastic81

19-03-2015

Can you provide your script that you're using? Are you limiting the keystrokes in the script or in the object settings, or are you limiting to the visible area? The reason I ask is that this script limits the number of keystrokes, and forces the focus to the next field so that the final keystroke is not lost.


if (xfa.event.newText.toString().length >= 5) xfa.host.setFocus("TextField2");