APIs & Integrations

SMcDonnell
メンバー | Elite Partner
メンバー | Elite Partner

eSignatures via URI

解決

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件の承認済みベストアンサー
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

eSignatures via URI

解決

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

元の投稿で解決策を見る

2件の返信
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

eSignatures via URI

解決

@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製品開発チーム
HubSpot製品開発チーム

eSignatures via URI

解決

@tjoyce , any nifty solutions up up your sleeve?

via GIPHY