Using a QR code to point to a form, and pre populate a field

Hi,

This is my scenario, I have a knack database of public defibrillators. I want to add a QR code onto a sticker, that allows someone to scan the code and report that it has been used (in order to trigger someone to go and check / replace items etc).

The defib directory table (DEFIB-DB) has an auto increment field, which then gets pulled into a text formulae (DEFIB-ID)and appends a ref number.

I have another database of usage (DEFIB-USE), that has a time and date stamp, and a connection to the main database linked via the text formulae (DEFIB-DB). So when you load the page, you get a dropdown all the DEFIB-IDs.

I would like to create a QR code - that I could add a URL to each unique qr code that essentially loads that page and pre selects the DEFIB-ID in the form… ideally that then confirms (displays) the DEFIB-LOCATION field - so the user sees

Report use of AED

You are logging that “DEFIB123”
located at “Cafe outside Park”.

has been used…

[SUBMIT]

I’ve looked through forums, and there was one linked in a chain, but I get a 404 error when I try to load it which is a pain… same with a few other related links on knack blog…

If it makes it any easier, I would be prepared to create a field that is a unique ‘sticker-id’ if the fact the current ID is a formulae. i.e. if a number field, or text field is easier… then this is not a problem.

Any help would be appreciated.

thanks

Andrew

1 Like

found answer

it was linked to a blog post, and if you search on main knack site it find nothing, but learn.knack.com is a different site and hence different search function…

1 Like

As @andrew.uk shared with our support team, the steps in the article shared above no longer are working as expected. I’ll look into the reason for this and update the article with the necessary information soon.

Apologies for any inconveniences.

1 Like

The article shared above has been updated with the following:

  • A note to remove the zero-width space character in step 4 has been added.
  • The URL provided in step 5 has been updated as well.
1 Like

Hi @andrew.uk,

That’s a cool use case you’ve got there. I can really see the value of being able to generate QR codes that trigger a form submit as soon as you aim at it with your cell phone’s camera. A form with an auto-populate fields and auto-submit also.

I will certainly add such a feature in the KTL eventually.

Let me invite you to see what the KTL can do with QR codes. I’ve just completed a demo page for you to see and experiment.

The coolest part is the real-time QR code generation, like a “QR typewriter” !

Go see it here:

https://ctrnd.knack.com/ktl-tutorials#ktl-demo-page/

No login required.

Related documentation is here: Keywords · cortexrd/Knack-Toolkit-Library Wiki (github.com)

Enjoy,
Norm

Hi to all,

I’ve just completed the feature I was talking about a week ago.
With just a pair of keywords you can do all this.

Go see the demo here:
https://ctrnd.knack.com/ktl-tutorials#auto-fill-and-submit-qr-generator/
Login: ktl@ctrnd.com
PW: ktl

For the Generator form, the keyword is:
_afsg=[https://ctrnd.knack.com/ktl-tutorials#auto-fill-and-submit/, view_450, 250], [qr, Store, Amount, Purchases], [auto, submit, close, 3], [disable, Store, Amount, Purchases], [ktlRoles, KTL Demo]

And for the Auto-Submit form, simply _afs

I will document more later.

Enjoy,
Norm