D J
D J

Reputation: 972

How to save a signature captured by svg file (Present in HTML-Form)

I am using a svg file in a iframe to get the user's Signature , which is implemented in a form, It works fine, but how can i save the signature at my server ? Is there any way to catch the data (" the signature" ) either in the same svg file loadable or any image ?

I am using HTML/ Javascript only .

Upvotes: 2

Views: 1122

Answers (2)

Mene
Mene

Reputation: 3809

You'll need to read the path data from the svg and then set that value to a hidden field in the form before you submit the form.

Here's a minimal example: http://mcc.id.au/2010/signature.html

Upvotes: 5

austincheney
austincheney

Reputation: 1199

If its really SVG then simply convert it to an XML file and name it with a svg file extension. The conversion to XML should require little more than an XML pragma on the first line.

Upvotes: -1

Related Questions