I am trying to build a page, only available for mobile devices which contains a form for the user to take a photo and click submit.
Rather than present the user with options to locate the image file, I want to offer only the default option of camera and submit, ideally already triggering the camera on load to reduce clicks. Specifying front or rear camera would be great.
I have found separate ways in JavaScript to activate the camera but any advice on how to do this on a form submission would be really appreciated.
Once added to a form, edit the field to see further field options. One of the available options is selecting the default capture mode for device cameras.
There’s no way to specify front or rear camera, at least none that I’m aware of.
I’m actually not sure if it will always save a local file on the device, I’ll have to test this. Let me know if you get to it first, I’d be happy to hear the answer.
The feature is really nice, but it would be ideal if:
1 - It didn’t save a local copy of the image.
2 - Reduce number of clicks - I’m thinking probably via JavaScript
Let me know if I missed anything about the feature in the steps I followed.
I have seen a solution before where the camera automatically opens, that would reduce a click. @Lee or @Chem might have more information here. It’s probably also possible to auto submit the form but I’d have to look into it further.
I also just tested this on iOS and interestingly, it does NOT save a local copy.
Also, although not related to my use case, I was interested in the ‘Microphone’ capture type, assuming it can be used to record voice notes, however, on my Android device, this just opens up the camera; have I misunderstood?