APIs & Integrations

SMcDonnell
Membre | Partenaire solutions Elite
Membre | Partenaire solutions Elite

eSignatures via URI

Résolue

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 Solution acceptée
tjoyce
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

eSignatures via URI

Résolue

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

Voir la solution dans l'envoi d'origine

2 Réponses
tjoyce
Solution
Expert reconnu | Partenaire solutions Elite
Expert reconnu | Partenaire solutions Elite

eSignatures via URI

Résolue

@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
Équipe de développement de HubSpot
Équipe de développement de HubSpot

eSignatures via URI

Résolue

@tjoyce , any nifty solutions up up your sleeve?

via GIPHY