On a login page, I have managed to catch the autofill to adapt the input display. Now I would need to validate the data itself, but I can't get the input value, it is empty.
<label title="signInEmailAddress" for="signInEmailAddress">
<span class="">Email</span>
<input id="signInEmailAddress" type="text" name="signInEmailAddress" required="true" />
</label>
let autoFillInputs = document.querySelectorAll('input:-webkit-autofill');
setTimeout(() => {
if (autoFillInputs) {
autoFillInputs.forEach(function(autoFillInput) {
let label = autoFillInput.closest('label');
if (label) {
label.classList.add('active');
}
setTimeout(() => {
let value = autoFillInput.value;
if (value) {
Form.validateInput(autoFillInput);
}
}, 50);
});
}
}, 500);
How can i get the value? These are text inputs (username and password)