Hello - I have a form with a dataset and linked input fields as well as a save button. When the form loads I place the current users email into an input box but when I select the Save button, the value in that input box (ProviderIDText) is not being inserted in the table. All other fields are saving except for this field which I called ProviderID. The input box is not read only and I see that it is displaying the email address on load but for some reason it is not making it into the dataset.
import wixUsers from ‘wix-users’ ;
import wixData from ‘wix-data’ ;
$w.onReady( function () {
let user = wixUsers.currentUser;
let userId = user.id; // “r5cme-6fem-485j-djre-4844c49”
let isLoggedIn = user.loggedIn; // true
user.getEmail()
.then( (email) => {
$w( “#ProviderIDText” ).value = email.toString(); // “user@something.com”
//$w(“#SpacesDataset”).setFieldValue(“SpaceProviderID”, email);
})
$w( “#SpaceCountryDropDown” ).value = “US”
$w( “#StatusText” ).value = “Draft”
} );