Q: Does Bitform have a camera-only upload feature?
Does Bitform have a camera-only upload feature?
I want to create form for verified people in my organization, and i want using field that upload form camera only for take their selfie picture and another case like inspection or safety or security guard that want upload realtime picture, are bitform have this feature?
Yes, Bit Form includes a field called Advanced File Upload, which supports a Capture feature,ideal for your use case.
This feature is especially useful on mobile devices and offers several capture modes:
* Off –Users can only upload files from their device’s storage.
* On – Users can choose to upload files from storage or capture using the device's camera.
* Use the Camera – Forces users to take a real-time photo using their front or rear camera (depending on device settings and permissions).
* Use the Environment Camera – Uses the rear-facing (higher quality) camera for image capture.
This makes it perfect for scenarios like identity verification, field inspections, or safety reporting.
I tried it, but the form doesn’t open the camera on mobile or desktop. Here is my setting: https://www.awesomescreenshot.com/image/55162591?key=2128a205f93a9540e83bb2830ab07265. If I turn on 'Allow File Browse,' it works on mobile, but on desktop, clicking the field opens a file browser, which I don’t want.
To enable camera functionality, please make sure 'Allow File Browse' is turned on this is required for the Capture feature to work correctly.
The Capture feature is designed specifically for mobile browsers. That’s because the capture attribute is supported by mobile devices, allowing direct access to the camera. On desktop browsers, this attribute isn’t supported, so the field will open the file selection window instead.
You can follow this guide: https://bit-form.com/wp-docs/form-fields/advanced-file-upload-settings-guide/#7-capture
Is it possible to hide the upload field when the user accesses this on a desktop?
Yes, it’s possible to achieve this using our filter hook. Below is a custom demo code snippet you can use with the bitform_filter_after_workflow_onload_fields filter.
For more details documentation: https://bit-form.com/wp-docs/developer-docs/php-filter-hooks/#bitform_filter_after_workflow_onload_fields
//Demo Code
add_filter('bitform_filter_after_workflow_onload_fields', 'your_function_name', 10, 2);
function your_function_name($fields, $formId) {
if($formId == 4){ /* Replace 4 with your actual formId */
if(wp_is_mobile()){
$fields->{'b4-2'}->valid->hide = false; /* Replace 'b4-2' with your actual field key */
}
}
return $fields;
}