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

when input hidden deal with script #131

Open
yewon97 opened this issue Oct 27, 2023 · 1 comment
Open

when input hidden deal with script #131

yewon97 opened this issue Oct 27, 2023 · 1 comment

Comments

@yewon97
Copy link

yewon97 commented Oct 27, 2023

Hello.

<input type="hidden" name="test" value="" />
if i validate this input,
but I update the value using script like $("[name=test]").val('something');

However, the error message does not work dynamically when controlled by script like that.
Maybe it's because it's only supposed to work in events such as input, change, keyup, etc.
Is there any way to solve the above method?

@horprogs
Copy link
Owner

horprogs commented Nov 2, 2023

Hey, you are right. I guess you could use this workaround https://stackoverflow.com/questions/3179385/val-doesnt-trigger-change-in-jquery like

$("[name=test]").val('something').trigger("change");

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

2 participants