Custom SignUp not working as Expected

Hi,
I have followed this tutorial.

https://support.wix.com/en/article/velo-tutorial-creating-a-custom-registration-form-with-code

But Am getting error in the Code.
My Code is :

import wixUsers from ‘wix-users’ ;
import wixLocation from ‘wix-location’ ;

$w . onReady ( function () {
$w ( ‘#submit’ ). onClick (() => {
let emails = ;

    emails . push ( $w ( '#email' ). value ); 

    const  nintei  = $w ( '#nintei' ). value ; 

    

    wixUsers . register ( $w ( '#email' ). value ,  $w ( '#password' ). value , { 

            "contactInfo" : { 
                "firstName" :  $w ( '#firstName' ). value , 
                "lastName" :  $w ( '#lastName' ). value ,                         
                "emails" :  emails , 

“nintei” : nintei

            } 
        }) 
        . then (( result ) => { 
            // On Success 
            console . log ( result ); 
            console . log ( "Success" ); 
            $w ( '#completion' ). show (); 
            $w ( '#errormessage' ). hide (); 

            wixLocation . to ( "https://www.m.com/thanks-page" ); 

        }) 
        . catch (( error ) => { 
            // On Failure 
            console . log ( error ); 
            console . log ( "Failed" ); 
            $w ( '#errormessage' ). show (); 
            $w ( '#completion' ). hide ; 
        }); 

}) 

})

My Error is :
Type ‘{ firstName: string; lastName: string; emails: string; nintei: string; }’ is not assignable to type ‘ContactInfo’. Object literal may only specify known properties, and ‘“nintei”’ 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.

And I have Added that custom field in Contact list too
Name : nintei

But,
Am unable to add that custom field to the contact.
Please correct me where i made mistake

Thanks

Do not use the DEPRICATED wixUsers-API. This one is OLD and was replaced by a new one.

Take a look onto the VELO-API-DOCS!

https://www.wix.com/velo/reference/wix-users/login

Hi Velo-Ninja,

Thanks for your valuable response

I have change the code , But am still getting same error

// import wixUsers from ‘wix-users’;

import { authentication } from ‘wix-members’ ;

import wixLocation from ‘wix-location’ ;

$w . onReady ( function () {
$w ( ‘#submit’ ). onClick (() => {
let emails = ;

    emails . push ( $w ( '#email' ). value ); 

    const  nintei  = $w ( '#nintei' ). value ; 

    

    authentication . register ( $w ( '#email' ). value ,  $w ( '#password' ). value , { 

            "contactInfo" : { 
                "firstName" :  $w ( '#firstName' ). value , 
                "lastName" :  $w ( '#lastName' ). value ,                         
                "emails" :  emails , 

“nintei”: nintei

            } 
        }) 
        . then (( result ) => { 
            // On Success 
            console . log ( result ); 
            console . log ( "Success" ); 
            $w ( '#completion' ). show (); 
            $w ( '#errormessage' ). hide (); 

            wixLocation . to ( "https://www.my.com/thanks-page" ); 

        }) 
        . catch (( error ) => { 
            // On Failure 
            console . log ( error ); 
            console . log ( "Failed" ); 
            $w ( '#errormessage' ). show (); 
            $w ( '#completion' ). hide ; 
        }); 

}) 

})

Can you please help me out

@kottravaipaalai

Take a look onto this example DATA for CONTACTs to be placed in Wix-CRM.
Are you able to see the difference? Take a look onto the structure.

const contactInfo = {
11  name: {
12    first: 'Ari',
13    last: 'Thereyet'
14  },
15  emails: [
16    {
17      email: 'ari.thereyet@example.com',
18    },
19    {
20      email: 'ari.thereyet.appended.email@example.com'
21    }
22  ],
23  phones: [
24    {
25      tag: 'MOBILE',
26      countryCode: 'US',
27      phone: '601-081-124',
28      primary: true
29    }
30  ]
31};

https://www.wix.com/velo/reference/wix-crm/createcontact

Additional info:


Test it out. I would also have to test it first to give you an exact answer for your issue.

Thanks for your valuable response .
I have checked this also,
But Not Finding Exact Syntax for Custom Fields .
Any Examples available ?

Ask the post-opener of the following post …

I asume your problem is exact the same. This user could make it work, perhaps he can help you out, since he has an working example.

If you’re still looking, looks like Custom Fields in the contactInfo object must match the display name of the field , and not the key. The same goes for labels