formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Enable the "Use Camera" option in the form components only if the "Enable web camera" option is checked

Open llemire-exp opened this issue 8 months ago • 1 comments

Describe the bug The "use Camera" option in a file component is only available when both the "Display as image(s)" and the "Enable web camera" are selected.

Version/Branch version 4.19.1 and on the playground

To Reproduce Steps to reproduce the behavior:

  1. Create form
  2. Add a file component
  3. Go into the "file" tab
  4. check the option "Enable web camera"

Expected behavior The "Use Camera" option inside the file component should appear with only the "Enable web camera" option checked, it shouldn't depend on having both "Enable web camera" and "Display as image(s)"

Screenshots With Only "Enable web camera"

Image

With both option

Image

Additional context We want to be able to upload pictures taken with the camera but still be able to upload them as a list of files instead of having the picture appearing inside the file component, for example:

Image

llemire-exp avatar May 07 '25 21:05 llemire-exp

I found this older issue: #3137, however the observed behavior seems to be different that what it is today, for the "Use Camera" option to appear you need both option enabled, not just the "Display as image(s)"

Another commenter pointed out that a user can still click on browser -> Take photo or video -> select photo, however on IOS if the file component can have multiple values, then there is an error that there is already an image with the same name

Image

llemire-exp avatar May 08 '25 13:05 llemire-exp

@llemire-exp Thank you for your feature request. I have logged a ticket for the backlog. We are always willing to review any contributions to resolve this issue from the open source community.

For internal reference: FIO-10330

olgabann avatar Jun 25 '25 13:06 olgabann

@llemire-exp We reviewed this use case and recommend the following:

For Mobile environments, the file component "Browse" function then relegates control to the Phone UI and should be used for this use case.

The Web Camera setting pertains to Computers with Web cameras, not mobile devices.

No other settings are needed, as this allows the user to choose Camera, Camera/Video or Photos from the phone's gallery.

We are archiving this ticket and closing the issue. Let us know if you have any other questions or comments about this use case.

heather-formio avatar Jun 27 '25 15:06 heather-formio