Custom Javascript auto-submit

Good day, I have a form with a UPC field and once the user scan a connected barcode, he/she is forced to confirm the search result and press the Submit button. I am not a strong javascript user can someone help. the following is the user flow.

SCAN

select the result and press Submit

$(document).on(‘knack-view-render.view_9’, async function (event, view, record) {

const inputFieldKey = ‘field_63’; // The field you want to listen for changes to

$(`#${view.key} #kn-input-${inputFieldKey} select`).on(‘change’, function () {

if ($(this).val()) {

  $(\`#${view.key} button\[type=submit\`).click(); // Auto click the submit button on this view's form

}

});

});

Hi @Michel

what issue you are facing with your current code implementation ?

for button click code part, you can use something like this:

$(‘#’ + view.key + ’ form button[type=submit]').trigger(‘click’);