Dear all,
I would like to add into my database table an additional field which will allow to sign (web, ipad, iphone etc.) the signature of the user.
For that purpose I prepared a very simple website with a signature area (http://www.planetnikon.de/sign) at the very bottom. If you click on this field a little popup window apperars and you can sign with your fingers (mobile device) or your mouse (pc).
This princip is clear (HTML5 --> canvas).
My question is: How can I store this grafic as a jpg file and send it (over an hidden HTML field) to the database record in my appgini application?
Any ideas?
KR
Yilmaz
Field for electronic signature
Re: Field for electronic signature
This may help. You should be able to do this in the tablename_before_insert hook.
Re: Field for electronic signature
Wow! This is amazing. Great work with that signature area page. I would love to learn how you did that and the final AppGini integration when you get it to work. Amazing!!!
Re: Field for electronic signature
The URL is dead so I can't see that part.
Did anyone ever get it working in AppGini that can show someone how it was done?
Did anyone ever get it working in AppGini that can show someone how it was done?
Re: Field for electronic signature
I don't know how it's done in this post, I had to do something similar, and used Signature Pad. On save just do an ajax request passing the signature, it's a dataurl you can convert to png from server side
/Giuseppe
Professional Outsourcing Services
Professional Outsourcing Services
Re: Field for electronic signature
I do want to capture digital signature with the records into my table. please help me with it.
Re: Field for electronic signature
Dear all,
Did anyone implement in the meanwhile "signature pad" library to use it within Appgini as a field for electronic signature to save it into mySQL?
Kind regards,
Yilmaz
Did anyone implement in the meanwhile "signature pad" library to use it within Appgini as a field for electronic signature to save it into mySQL?
Kind regards,
Yilmaz
Re: Field for electronic signature
Stand by, I will have a look today.
Kind regards,
Jan
Kind regards,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Field for electronic signature
It's tricky, but finally I have managed to turn AppGini text-fields into Signature Pad areas:
- Create a field (datatype = Text) in your TABLENAME
- Publish your app and ensure all fields have been rebuilt
- Include the JavaScript library from their CDN:
https://www.jsdelivr.com/package/npm/signature_pad
I am using 2.3.2 which is latest stable version today. - In your TABLENAME_dv append a <canvas> to your $html variable
- Create a TABLENAME-dv.js file in your hooks folder
- I am hiding the field using .hide() function and only show the drawing-canvas
- Find the canvas, create a SignaturePad object, pass the canvas and some options (see below)
Code: Select all
var elem = document.getElementById(canvas_id); var signaturePad = new SignaturePad(elem, { backgroundColor: 'rgba(255, 255, 255, 0)', penColor: 'rgb(0, 0, 128)', });
- Now in your JavaScript on change of Signature Pad get the data usign .ToData() function. There is an onEnd() event which can be used for detecting every end of a stroke
- I am converting the raw data into Json using JSON.stringify, but there are other alternatives like converting the image into a Base64 string
- Store the json in your field:
Code: Select all
var field = jQuery('#' + fieldname); signaturePad.onEnd = function () { var data = this.toData(); field.val(JSON.stringify(data)); };
- On load of your form, get the data (which comes as text from database) and convert it into json:
Code: Select all
var data = field.val(); if (data) { data = JSON.parse(data); }
- Pass your json object to the Signature Pad object:
---
Code: Select all
var signaturePad = new SignaturePad(elem, { backgroundColor: 'rgba(255, 255, 255, 0)', penColor: 'rgb(0, 0, 128)', }); if (data) { signaturePad.fromData(data); }
This is quite complex for non-programmers. If there is enough interest, I can continue working on a plugin library which will reduce coding to a few lines of code, only:
Changes in hooks\TABLENAME.php:
Init my helper class; 1st arg: columnname; 2nd arg: editable { true | false }Changes in hooks\footer-extras.phpCode: Select all
function ratings_dv($selectedID, $memberInfo, &$html, &$args){ $signature = new \AppGiniHelper\SignaturePad("signature", true); $html .= $signature; }
---Code: Select all
\AppGiniHelper\SignaturePad::finalize();
It's a lot of work to get this running. If you are interested in buying the code and/or in me supporting your project, please send me a PM or contact me: https://www.bizzworxx.de/en/appgini-improvements/
Kind Regards,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Field for electronic signature
Hallo Jan,
habe Dir eine PN verschickt!
Viele Grüße
Yilmaz
habe Dir eine PN verschickt!
Viele Grüße
Yilmaz
Re: Field for electronic signature
Dear all,
during these crazy times of Corona and especially HomeOffice it's getting more and more important that most of company related workflows are digital.
So electronic signing of forms and approvements is a MUST HAVE! Is there any near future plan to integrate this functionaly (like https://github.com/szimek/signature_pad) in AppGini as a standard "esign field".
I had also contact last year to Jan for individual developement of this topic but it was for me as only 1 interested person to high costs. May be there are in the meanwhile some other AppGini users we can ask Jan to implement this and we all can divide the costs among us?
Kind regards,
Yilmaz
during these crazy times of Corona and especially HomeOffice it's getting more and more important that most of company related workflows are digital.
So electronic signing of forms and approvements is a MUST HAVE! Is there any near future plan to integrate this functionaly (like https://github.com/szimek/signature_pad) in AppGini as a standard "esign field".
I had also contact last year to Jan for individual developement of this topic but it was for me as only 1 interested person to high costs. May be there are in the meanwhile some other AppGini users we can ask Jan to implement this and we all can divide the costs among us?
Kind regards,
Yilmaz
Re: Field for electronic signature
Hi Jan,
I've recently purchased your AppGini Helper library.
It would be great if you could incorporate adding Signature Pad objects in your library.
I think this would be useful for many people.
In the next few days, I'm going to try and add a Signature Pad object based on the help you've provided above. *Fingers Crossed*
Kind regards,
Grant
I've recently purchased your AppGini Helper library.
It would be great if you could incorporate adding Signature Pad objects in your library.
I think this would be useful for many people.
In the next few days, I'm going to try and add a Signature Pad object based on the help you've provided above. *Fingers Crossed*
Kind regards,
Grant
Re: Field for electronic signature
Hi IS there any update to this topic?
I would really like to add a signature field to my tables
I would really like to add a signature field to my tables