I'm New for coding, I want to display my customer card numbers in to Qrcode format.
i didn't know to write coding to fetch the QRcode API to user input text box.
As shown below its displaying as a number i want this to automatically change to Qrcode or barcode. Pls help me on this coding.
i did not go live because of this.
![](https://static.wixstatic.com/media/a27d24_3085ce993b194d1080a95ab1b587a64a~mv2.png/v1/fill/w_65,h_40,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_3085ce993b194d1080a95ab1b587a64a~mv2.png)
Hello Mr.Alex,
I have few doubts How to generate a Random Alphabet letters by using Wix code.
loyal customer visiting our shop and purchasing items, he/she will be sent a random alphabet as a SMS
During the duration of this campaign period,
If he/she gets all the alphabets constituting the word SHOP T, an SMS/Email will be sent.
On Wix database i am importing the information of Customer name/invoiceno/rewardcardno/amount. there is one more field on this DB called Gift. i want system to generate a Random Alphabet form "A-Z".
If he/she gets all the alphabets constituting the word SHOP T. Will get the gift.
Could you please guide us how to write a code for this.
Thanks, it works great..
Hello,
As I understand from your description, you'd like to do the next:
You have a list of cards = id's, instead of a number you want to generate a barcode.
Please see my sample (using the next API - http://goqr.me/api/ )
# I have a list of ID's in my collection
# Using a button with onClick event, to set a src for html component - with value from database.
Here is the code:
$w.onReady(function () { $w("#button1").onClick(() => { var cardid = $w("#input1").value; $w("#html1").src = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + cardid; $w("#html1").show(); }) });
Here is the site with live sample:
https://alex-wix.wixsite.com/barcode
Thanks.