Hi Anastasiia, you have another script running that is clearing that field out. If this is the Webflow checkout page, then it may be webflow.js resetting the input values itself.
Check your own scripts first if you have any, but if it’s webflow.js doing the reset, you’d need to set the field manually again after the reset happens. That’s more complicated to detect than it sounds, so one crude way to force it with a timer.
On that page only, you’d do something like this in the before-HEAD custom code;
<script>
function forceEmail(email) {
let checkCount = 0;
const interval = setInterval(function() {
const inputField = document.getElementById('wf-ecom-email');
// If the input field is empty and email is available
if (inputField.value === '' && email) {
inputField.value = user.email;
}
// Increment the check count
checkCount++;
// Keep checking for 4 seconds after page load
if (checkCount >= 20) {
clearInterval(interval);
}
}, 250);
}
window.sa5 = window.sa5 || [];
window.sa5.push(['userInfoChanged',
(user) => {
forceEmail(user.email);
}]);
</script>
This is untested, but pretty close to what you need. If you need help implementing a solution for this you can DM me here or on the SA5 forum.