Skip to content

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

@enfJoao

Description

@enfJoao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions