I am trying to code a customize sign-up page for my store. I am using the following code to capture data:
// API Reference: https://www.wix.com/velo/reference/api-overview/introduction
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world
import wixUsers from 'wix-users';
$w.onReady(function () {
$w('#button6').onClick( () => {
let emails = [];
let labels = [];
emails.push($w('#input6').value);
const IdNo = $w('#input9').value;
// register as member using form data
wixUsers.register($w('#input6').value, $w('#input5').value, {
"contactInfo": {
"firstName": $w('#input8').value,
"lastName": $w('#input7').value,
"emails": emails,
"labels": labels,
"IdNo": $w('#input9').value
}
});
});
});
Why is it failing with the following error:
//ERROR : ‘“IdNo”’ does not exist in type ‘ContactInfo’. It’s recommended you use a new variable, such as “let newVar = …” to make sure that all code completion work correctly.
IdNo is a custom field I already defined in my ‘Contacts’