eSignatures via URI

SOLVE
SMcDonnell
Member | Platinum Partner

I am working on a form that is going to connect to HubSpot via API. This form is going to have an esignature functionality. I would like send it as an URI. Is there a way for HubSpot to display an image from an URI? Is there a better way to do this? 

 

The signature image is going to be collected via a canvas element. I am trying to avoid having to save the signature as a file on my servers or on the client's local machine. 

 

Thank you 

1 Accepted solution

Accepted Solutions
tjoyce
Solution
Recognized Expert | Platinum Partner

@SMcDonnell - Does it have to be a URL parameter? or could you do localStorage instead?

 

<canvas id="canvas" width="5" height="5"></canvas>
var canvas = document.getElementById('canvas');
var dataURL = canvas.toDataURL();
localStorage.setItem('esignature', dataURL);

 

Then on the subsequent page

<img src="" id="signature" />
let signatureImage = localStorage.getItem('esignature');
$('#signature').attr('src', signature);

 

Something like that? haven't tested, let me know if that works.

View solution in original post

2 Replies 2
dennisedson
Community Manager

@tjoyce , any nifty solutions up up your sleeve?

via GIPHY

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
tjoyce
Solution
Recognized Expert | Platinum Partner

@SMcDonnell - Does it have to be a URL parameter? or could you do localStorage instead?

 

<canvas id="canvas" width="5" height="5"></canvas>
var canvas = document.getElementById('canvas');
var dataURL = canvas.toDataURL();
localStorage.setItem('esignature', dataURL);

 

Then on the subsequent page

<img src="" id="signature" />
let signatureImage = localStorage.getItem('esignature');
$('#signature').attr('src', signature);

 

Something like that? haven't tested, let me know if that works.

View solution in original post