Read qr code by Camera

Vincenzo86

New Member
Good evening
I?m very new in fabrik, Is possible to read a qr code by the Camera of a smartphone in a field element?!
I need to read the value of a qr code in a field element and save
Thanks
 
That's out of Fabrik's scope. It'd depend on the features of the QR scanner you are using, being able to paste the result of a scan.

-- hugh
 
AFAIK there is no support in any mobile phone web browser to activate the camera, recognise a QR code and return the QR details into a text field. It is just not functionality available in the web browser that Fabrik could hook into.

So,as Hugh says, the best you could achieve is to use a camera QR app and copy & paste the results into a text field.
 
Ok - a bit more research. I have still found no reference to an automated recognition of QR codes by the browser, but in theory it should be possible to do it as follows:

Safari browser v6.0 and later on iPad supports Web Media Capture as defined at https://www.w3.org/TR/html-media-capture/.

According to this '<input type="file" name="image" accept="image/*" capture="environment">' would enable the capture of a photograph of the QR code. Once the picture has been captured, then you would be able to:

a. Either run Javascript code (such as https://github.com/cirocosta/qcode-decoder) to decode the QR and put the decoded value into a different <input> field; or
b. Upload the photograph and run php code to decode the QR. There are a couple of Github repo's which claim to do this.

NOTE: Fabrik does not currently support this - someone would have to write the code to do it.
 
Good luck with this. If you make it work please come back and tell us how you did it so we can share it with anyone else who might want to do it.

If you are going to attempt this yourself, then rather than trying to code a whole new type of element or tweak an existing element to achieve it, I would suggest that you try doing it by creating a photograph field with a change Javascript event on it with bespoke Javascript that runs the QR decoder, puts the results in another field and triggers a change event on that field. I have no idea whether this would work, but it is how I would approach it if I wanted to try this.
 
Good luck with this. If you make it work please come back and tell us how you did it so we can share it with anyone else who might want to do it.

If you are going to attempt this yourself, then rather than trying to code a whole new type of element or tweak an existing element to achieve it, I would suggest that you try doing it by creating a photograph field with a change Javascript event on it with bespoke Javascript that runs the QR decoder, puts the results in another field and triggers a change event on that field. I have no idea whether this would work, but it is how I would approach it if I wanted to try this.
I was kind of surprised there isn't a solution for this, like there is for pretty much all other code scanning systems. Even more surprising, none of the three QR apps I have on my (Android) phone even support copying the decoded text to the clipboard.

Sent from my HTC6545LVW using Tapatalk
 
My QR App puts the decoded text automatically into the clipboard; it doesn't ask, the text is "just there".
Android "Barcode-Scanner"
 
Does your app depend on filling in a single field or can it open up a new form with url querystring? Cheesegrits helped me setup a qr code that is emailed out and opens a form to validate a user's admission ticket.

If you did want a regular barcode to be read I can test a handheld scanner that I have around with Fabrik but this would be desktop only, no mobile support since its USB.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top