Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

insert qr code into edit form ? ? ?

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
honza1965
Posts: 20
Joined: Wed Apr 28, 2021 9:19 pm
Has thanked: 1 time
Been thanked: 1 time

insert qr code into edit form ? ? ?

Unread post by honza1965 »

please I nicely need to enter the QR code anywhere in the form . . .

in an external html file (see below) it works

Thank you for the inspiration Honza

=================================================================


<!DOCTYPE html>
<html>
<head>
<title>QR Code Generate</title>

<!-- (A) LOAD QRCODEJS LIBRARY -->
<!-- https://cdnjs.com/libraries/qrcodejs -->
<!-- https://github.com/davidshimjs/qrcodejs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/ ... "></script>
</head>
<body>
<!-- (B) GENERATE QR CODE HERE -->
<div id="qrcode"></div>

<!-- (C) CREATE QR CODE ON PAGE LOAD -->
<script>
var qrcode = new QRCode(document.getElementById("qrcode"), "https://code-boxx.com/");
</script>
</body>
</html>
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Re: insert qr code into edit form ? ? ?

Unread post by pmjd »

Add a new html object to your form, in the html section enter just the following code, it seems to work for me.

Code: Select all

<div id="qrcode"></div>

<!-- (C) CREATE QR CODE ON PAGE LOAD -->
<script>
var qrcode = new QRCode(document.getElementById("qrcode"), "https://code-boxx.com/");
</script>
If it's not the right ocde you may need to add the

Code: Select all

<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
to the nuBuilder Header
honza1965
Posts: 20
Joined: Wed Apr 28, 2021 9:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: insert qr code into edit form ? ? ?

Unread post by honza1965 »

on my screen - only gray space
You do not have the required permissions to view the files attached to this post.
honza1965
Posts: 20
Joined: Wed Apr 28, 2021 9:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: insert qr code into edit form ? ? ?

Unread post by honza1965 »

the developer console captured this message
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4302
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: insert qr code into edit form ? ? ?

Unread post by kev1n »

In a HTML object:

Code: Select all

<div id="qrcode"></div>
<script>
var qrcode = new QRCode(document.getElementById("qrcode"), "https://code-boxx.com/");
</script>
In (Setup->) Header:
header.jpg
Output:
output.jpg
You do not have the required permissions to view the files attached to this post.
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: insert qr code into edit form ? ? ?

Unread post by miasoft »

How to insert this (generated) qr-code in Detail section of Report?
Last edited by miasoft on Sun Nov 21, 2021 2:23 am, edited 1 time in total.
Wbr, miasoft.
honza1965
Posts: 20
Joined: Wed Apr 28, 2021 9:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: insert qr code into edit form ? ? ?

Unread post by honza1965 »

Hooray. . . Solved ! ! ! . . . I had a bug in the script position in "Header". . . . :-) Thank you very much Kevin
Post Reply