APIs & Integrations

SMcDonnell
Mitglied | Elite Partner
Mitglied | Elite Partner

eSignatures via URI

lösung

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 Akzeptierte Lösung
tjoyce
Lösung
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

eSignatures via URI

lösung

@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.

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
tjoyce
Lösung
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

eSignatures via URI

lösung

@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.

dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

eSignatures via URI

lösung

@tjoyce , any nifty solutions up up your sleeve?

via GIPHY