Is it possible to use form element that can use native mobile features like camera, photos. Also is it possible to have stopwatch field in which user responses can be timed using start/pause/stop stopwatch and be a field in a form.

Comments

Shaunikm created an issue. See original summary.

jrockowitz’s picture

Features like this would have to come from third party libraries integrated using a contrib module.

We can look around the web and Drupal and see how people are implementing these types of widget.

jrockowitz’s picture

I think the manage_file upload element can be easily enhanced to use HTML5 capture attribute.

I need to think about the best way to implement this feature. Might make sense to create dedicated ImageFile, VideoFile, AudioFile elements with custom formatting.

I think a stopwatch element is too specific and not something that the core YAML Form module should support.

jrockowitz’s picture

Status: Active » Fixed

The latest dev release includes #2823627: Provide dedicated video, audio, and image file upload with media capture., which support native mobile integration for video, audio, and image file uploads.

I now realize that the "stop watch" feature you are looking for is more like integration with software like Google Analytics which can track how long it takes a user to complete a form. Form analytics and tracking should be handled in separate contrib module.

Below are some D7 module that are tracking form submission.

Shaunikm’s picture

@jrockowitz: Thank you for the explanations and work arounds. Correct me if I am wrong, but can YAML form accept native HTML form fields or we'll need to create custom field with these HTML attributes. Re: Stopwatch, I was essentially looking for timer as part of form field to record time of some other activity (not form filling) and recorder can start timer, stop and resultant can be added to form field.
Thanks for work with the plugin.

jrockowitz’s picture

You can add custom attributes to native HTML form fields as well as create custom form elements. Are there any specific attributes that you are looking for?

For a stop watch/timer you would need to create a custom form element. (See #2823997: How to add custom Form elements)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.