Feedback server feedback.js

feedback.js is a great jquery plugin that allows you to create feedback forms that include a screenshot created in the client browser along with the form.

How can I send the captured image and user review to the server api?

+6
source share
1 answer

Indeed feedback.js is an incredible piece of javascript. Thanks a lot, Niklas von Herzen! However, this is not dependent on jQuery, but you can use both pages on the same page.

You can send the image to the server by passing the "url" parameter. The feedback function supports many parameters, for example:

Feedback({h2cPath:'/js/html2canvas.js', url: '/send/email/uri/on/server', label: "Send an email", header: "Let send an email!", messageSuccess: "Done!", messageError: "Uh oh..." }) 
  • h2cPath: location of the html2canvas.js file (required, other parameters optional).
  • url: URL when the user submits feedback. This is the answer to your question.
  • label: text of the feedback button.
  • header: the title of the popup text.

The URL specified in the URL is invoked using the HTTP POST method with the image in the "data" parameter. The image itself is encoded as a DOMString . If you want to know exactly what it contains, see the toDataURL specification. Other information that your users entered is included in other parameters, depending on the form fields that you define.

+11
source

All Articles