Stop form submit when using scanner
My app uses an external QR scanner to read some codes. Everything is working correctly. However, everytime the scanner reads something the
form
is submitting
which is not something I want to happen. Field should only display the value and thats it.
Anyways I can control this behaviourSolution:Jump to solution
you could try something like this?
```php
TextInput::make('qr_code')
->label('Scan QR Code')...
4 Replies
Thats because most QR scanners scan the code and then automaticly follow that with an "enter". You would have to prevent that action from happening, either change it in your scanner or catch it in the code.
Yeah that’s what I want to figure out 😬 how to catch it or disable that automatic enter in scan reads.
Solution
you could try something like this?
Thank you for tacking the time to answer. This work perfectly 🙂