How to make custom name and qr code base on link name like this image.
I mean, I want to send a wedding invitation which say welcome to specific guess name and can generate qr code based on url.
Ex:
link: picasso.com/Aris+Pujud+Kurniawan
the website will show: Hello Aris Pujud Kurniawan + Qr code bottom name (like image below)
Can I do that? Any developer can do that? I will pay it.
//-- get the serach param
var paramsString = window.location.search
//-- get the qr element
var qrel = hypeDocument.getElementById('qrcode')
//-- generate new qr code using madaffandi url + querystring
var qrcode = new QRCode(qrel, {
text: 'https://madaffandi.com/novitaheru/' + paramsString,
width: hypeDocument.getElementProperty(qrel, 'width'),
height: hypeDocument.getElementProperty(qrel, 'height'),
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
//-- make params in to object
let searchParams = new URLSearchParams(paramsString);
//--look for param
var theOf_ = searchParams.get("of")
var theDate_ = searchParams.get("date")
var theTo_ = searchParams.get("to")
//-- set element text based on param
hypeDocument.getElementById('theof').innerHTML = theOf_
hypeDocument.getElementById('thedate').innerHTML = theDate_
hypeDocument.getElementById('theto').innerHTML = theTo_
If you are scanning with "QR Attendance Control" then I assume it will work as you expect.
QR codes are pretty much the same afaik, the scanning app controls what happens when scanned.
You can probably just use the param as the set url since it is not going to be used
//https://YOURURL?to=John+Travolta
//-- get the serach param
var paramsString = window.location.search
//-- get the qr element
//-- make params in to object
let searchParams = new URLSearchParams(paramsString);
//--look for param
var theTo_ = searchParams.get("to")
//-- set element text based on param
hypeDocument.getElementById('theto').innerHTML = theTo_
var qrel = hypeDocument.getElementById('qrcode')
//-- generate new qr code using madaffandi url + querystring
var qrcode = new QRCode(qrel, {
text: theTo_,
width: hypeDocument.getElementProperty(qrel, 'width'),
height: hypeDocument.getElementProperty(qrel, 'height'),
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
You can always just right-click on a Hype file and inspect package contents. The JS file is in the resources' folder. Another option is to export the file and the just snap the desired JS file from the exported resource folder. There is also a trick to use and preview and the right click on the filename on top, but certainly Hype could add a reveal in finder option.
How if I want to place two qr code and two name which the same in one file?
I try to copy "theto" and "qrcode" object it's not working.
Then I copy
"theto" and rename to "thetoopen"
and "qrcode" rename to "qrcodeopen"
and change the html code to this:
//https://greenhouse.picasso.id/?to=John+Travolta
//-- get the serach param
var paramsString = window.location.search
//-- get the qr element
//-- make params in to object
let searchParams = new URLSearchParams(paramsString);
//--look for param
var theTo_ = searchParams.get("to")
//-- set element text based on param
hypeDocument.getElementById('theto').innerHTML = theTo_
hypeDocument.getElementById('thetoopen').innerHTML = theTo_
//-- get the qr element
var qrel = hypeDocument.getElementById('qrcode')
var qrelopen = hypeDocument.getElementById('qrcodeopen')
//-- generate new qr code using madaffandi url + querystring
var qrcode = new QRCode(qrel, {
text: theTo_,
width: hypeDocument.getElementProperty(qrel, 'width'),
height: hypeDocument.getElementProperty(qrel, 'height'),
colorDark : "#738766",
colorLight : "#f0f0f0",
correctLevel : QRCode.CorrectLevel.H
});
var qrcode = new QRCode(qrelopen, {
text: theTo_,
width: hypeDocument.getElementProperty(qrel, 'width'),
height: hypeDocument.getElementProperty(qrel, 'height'),
colorDark : "#738766",
colorLight : "#f0f0f0",
correctLevel : QRCode.CorrectLevel.H
});