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

Form elements (input, text-area, etc) start with undefined instead of empty string #1263

Open
enfJoao opened this issue Mar 5, 2025 · 0 comments

Comments

@enfJoao
Copy link

enfJoao commented Mar 5, 2025

dnn-input id="wName" minlength="10" required=""></dnn-input>

console.log("Name: " + document.getElementById("wName").value);

In this example, the console will log undefined until the input is changed. Then it will log "".

Inputs should start with "" to prevent all associated issues in validation and values handling.

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