QR Code Generator vCard Type

Hi everyone.

I have been reading the QR Code Generator Example in this URL https://www.wix.com/velo/example/qr-code-generator. The code in there works for different QR Code types (Text, URL, Phone, WiFi and Email). I wonder if I can generate a vCard QR Code and which will be the values to send in the function. Anyone who can help?

1 Like

Please elaborate more.

Hi @russian-dima . In the example I mentioned before, you can build a QR Code of some types. There are some functions in the code like these:

const changePhone = () => {
const value = $w ( ‘#inputPhone’ ). value ;

**if**  ( hasContent ( value )) { 
    updateImage ({ 
        value :  `tel: ${ value }`, 
    }); 
} 

};

const changeSMS = () => {
const phone = $w ( ‘#inputSMSPhone’ ). value ;
const message = $w ( ‘#textBoxSMSText’ ). value ;

**if**  ( hasContent ( phone )) { 
    updateImage ({ 
        value :  `SMSTO: ${ phone }:${ message }`, 
    }); 
} 

};

const changeWifi = () => {
const ssid = $w ( ‘#inputSSIDWIFI’ ). value ;
const encryption = $w ( ‘#dropdownAuthWIFI’ ). value ;
const password = $w ( ‘#inputPasswordWIFI’ ). value ;

**if**  ( hasContent ( ssid )) { 
    updateImage ({ 
        value :  `WIFI:S: ${ ssid } ;T: ${ encryption } ;P: ${ password } ;;` , 
    }); 
} 

};

const changeEmail = () => {
const email = $w ( ‘#inputEmail’ ). value ;
const emailSubject = $w ( ‘#inputEmailSubject’ ). value ? $w ( ‘#inputEmailSubject’ ). value : ‘’ ;
const emailBody = $w ( ‘#textBoxEmailBody’ ). value ? $w ( ‘#textBoxEmailBody’ ). value : ‘’ ;

**if**  ( hasContent ( email )) { 
    updateImage ({ 
        value :  `mailto: ${ email } ?subject= ${ emailSubject } &body= ${ emailBody }`, 
    }); 
} 

};

I would like to now if I can use the same npm package to generate a QR Code (Vcard) and how.

You can generate an ONLINE-vCard. How does it work?

Generate a page, where you will have all the needed DATA you want.
Copy the URL of the vCard-Page.
Generate a QR-Code for it.
Print Paper-vCards including the QR-Code on it.

Everyone who scans this QR-Code will automaticaly go to your online-vCard!

Thats it!

Scan the example’s-QR-Codes!

OK. But, what about if I want the QR code can create the contact in a mobile when it be scanned. Is it possible?

https://goqr.me/de/
Generate your vCrad.

Some more info-stuff…

will have to translate it…into your own language…