Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field Interactions: setValue doesn't update the character count display of the field #1550

Open
Luuk93 opened this issue May 31, 2024 · 0 comments

Comments

@Luuk93
Copy link

Luuk93 commented May 31, 2024

Hi, I am new to using the field interactions and am starting out with a simple one. Trimming trailing spaces from a name field after the field value changes.

I have the code below working however the character count that is displayed on the field doesn't update (so if it removes one trailing space from "John " then the count stays as 5/50. This isn't a major problem but it's a bit annoying and makes me think I'm doing something wrong? (have included screenshot). Is there anyway to have it update the count?

var valueTrimmed = API.getActiveValue().trim()
API.setValue(API.getActiveKey(), valueTrimmed)

image

Thank you!
Luke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant