Barcode Input for Forms Component

I have a project that I would like to use the new 8.3 “forms” component for perspective’s offline mode. However, one of the fields for this form is a barcode that needs to have the option to be input by a camera/scanner.

While I know that the barcode scanner input component is not currently included as one of the form widgets, I have found a workaround using a regular text field and a button with a “Scan Barcode” event attached. My question is, if it is not possible to use the barcode scanner input component as a widget, is there any way to include a button within the form next to a text input field to trigger the scan barcode action?

No, there’s no direct way to do that. Sorry. You could possibly position a barcode scanner input absolutely above a blank widget to make it appear as though it’s part of the form. Then write this input to the form’s context object. This would only work when a project is launched online, however, since there is not scripting or bindings available for projects launched offline, currently.

If it helps, we’re actively working on adding a file upload widget to the form component. It should be available very soon. A barcode scanning widget is next on the list, and then a signature widget, but not necessarily in that order.

3 Likes

Hi, I tested the barcode scanner with Perspective and it works offline as long as the application is initially started while connected to the gateway. The app continues scanning codes and stores the read data in a queue, which is automatically forwarded to the gateway once the connection is restored. I tested it with 100+ scans while offline and all of them were successfully sent to the gateway and stored in the database once the connection returned. To keep the application open, you can configure the phone to keep the screen on and disable auto-lock after a period of inactivity. This can be done directly in the mobile device settings or with a utility app if needed.