When the user completes this Wix Code form, I would like their information to be stored in Wix Contacts.
I have followed this tutorial: Velo Tutorial: Creating a Custom Registration Form with Code | Help Center | Wix.com
When I try the form in the editor:
I get a success message, but the information IS NOT showing up in Wix Contacts.
When I try the form on the live website:
I get an error message, but the information IS showing up in Wix Contacts.
Wix Contacts has been set up with these custom fields:
Here is the page code:
import wixUsers from ‘wix-users’;
$w.onReady( function () {
$w(‘#submitButton’).onClick( () => {
let emails = ;
emails.push($w('#emailUsername').value);
// register as member using form data
wixUsers.register($w(‘#emailUsername’).value, $w(‘#password’).value, {
“contactInfo”: {
“firstName”: $w(‘#firstName’).value,
“lastName”: $w(‘#lastName’).value,
“emails”: emails,
“Phone Number”: $w(‘#phoneNumber’).value,
“Title”: $w(‘#title’).value,
“Company”: $w(‘#company’).value,
“Department”: $w(‘#department’).value,
“Street Address”: $w(‘#streetAddress’).value,
“City”: $w(‘#city’).value,
“State”: $w(‘#state’).value,
“Zip Code”: $w(‘#zipCode’).value,
“Password”: $w(‘#password’).value,
“Retype Password”: $w(‘#retypePassword’).value,
}
});
});
});
Any help is greatly appreciated,
FD