Question

I want to open camera and save the picture taken. I don't want to upload saved picture. This can be done using the HTML5 - attribute:

How can I add this capture attribute to my input tag in Contact Form 7 ?

No correct solution

OTHER TIPS

You can't as of now add it to the tag, you'll need to add a custom file field in your form such as,

<label> Some Text field 
  [text my-text-field] </label>

<label> My image capture 
  <input type='file' id="imgInp" />
  <img id="blah" src="#" alt="your image" /> 
</label>

<script>
//add your custom JS script here
</script>

Note that you will also need some custom JavaScript to render the image, see the link above for more details.

Note also that your custom field will not be parsed by the cf7 plugin, and as a result it will not be validated, you'll need to do that yourself. It won't either be available to add to the notification mail, this too you will need to programmatically enable.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top