Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Visible/hidden depends on limited character

Avatar

Level 5

TextField_1 is visible and has limitation containing only 20 character.

TextField_2 is hidden.

When user will cross 20 charcter, automatically TextField_2 will be visible and cursor will go into this field.

Is it possible. How can we solve it?

1 Accepted Solution

Avatar

Correct answer by
Level 7

On the "full" event of TextField_1 you can use:

TextField_2.presence = "visible";

xfa.host.setFocus(TextField_2);

Be aware that the 21st character will be lost, but the 2nd field will become visible and the cursor will appear there. Is this an option?

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

On the "full" event of TextField_1 you can use:

TextField_2.presence = "visible";

xfa.host.setFocus(TextField_2);

Be aware that the 21st character will be lost, but the 2nd field will become visible and the cursor will appear there. Is this an option?

Avatar

Level 5

Great !!!!!!!!!!!!

Thanks a lot.