I'm trying to prefill the email field in the widget's form when a user is logged in on our site. I have managed to fill the email field with the user's email, but when trying to submit the form it looks like the form's validator does not accept the programmatically filled in email. I have to do a manual edit (eg add space, remove space) in the email field for the form to pass validation and get submitted.
I have tried to trigger events on the email field (input, keydown, keyup, keypress) but without success.
Is there a way to make the form pass validation when programmatically filling the email field?