the input is not submitted to the collection

Hi all!
I want the email of the user to be submitted automatically to a collection I created.
I created a code that gets the email and puts it in an input box. the problem is that if the user don’t click the email input box before he/she click on ‘submit’, the email is not being saved. the email is being saved in the dataset only if the user click on the email input box and them submit it to the dataset.
what should I do so the email will be saved even if the user doesn’t click to the input box? (the email of the user is stored there by default, so there is a value in it).

the code I wrote is:

import wixUsers
from 'wix-users';
let user=wixUsers.currentUser;
let userId=user.id;
letisLoggedIn=user.loggedIn;
user.getEmail().then((email)=>{letuserEmail=email;});
user.getEmail().then((email)=>{$w('#input1').value=email;})

import wixUsers from ‘wix-users’;
let email;

function promiseAll(){
	return Promise.all(
		wixUsers.currentUser.getEmail(),
		new Promise((resolve,reject) => {
			$w('#dataset1').onReady(() => {
				resolve('ready');
			})
		})
	)
}

$w.onReady(() => promiseAll().then(r => $w('#dataset1').setFieldValue('email', r[0]));