Add clear button to clear field on barcode scanning widget

Add clear button to clear field on barcode scanning widget. So there is no need to backspace the field to scan new barcode/QR-code

Author

Current Status

Open

Last updated: March 10, 2021

2 comments

Log in to comment on this feature request.

  1. schmucki says:

    update for Android. to get Android phones working we have to add this code to the frontend.js

    // Display response.

    displayResult.innerHTML = request.response;
    // value must use double quotes. single quotes not work.
    document.querySelector(‘input[name = “scan-code”]’).value = “”;
    // for android
    var elements = document.querySelectorAll(‘input[name=”scan-code”]’);
    elements[0].value= “”;

  2. schmucki says:

    clearing the scan-code value after submiting the scan-ticket form.
    I am using a piece of code right after request.send in the frontend.js of box office-plugin/assets/js :
    document.querySelector(‘input[name = “scan-code”]’).value = “”;

    that did the job for me.