Capturing a signature on a form and saving it in a

Alex Mitchell:
Capturing a signature on a form and saving it in a text field. eg. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABkCAYAAACsPrZKAAAAAXNSR0IArs4c6QAAAERl…… how would one decode to get the original signature/as image to be placed into a container field. tried using Base64Decode and getting a ‘?’

You can be 64 decode and insert into container. If you Google a file maker community, they’re probably examples.

Basically, you have to set the file type to PNG and I believe at a file name as well

MF Leong:
This is what I did. The field signbyCustomer stores the base64 coming in from BF. I used a custom function “After” to remove data:image/png;base64, from the base64. This is essential for Base64Decode to work. Otherwise it will return “?”. The last parameter is a random filename with .png as extension.


Alex Mitchell:

hey thanks MF Leong, that did work.  code coming in from BF putting into field as text and the signature as a container with an autoenter calc:                                      Let ([
~signature = Waivers::signatureEncoded;
~list = Substitute ( ~signature ; "," ; ¶ );
~code = GetValue ( ~list ; 2 )


Base64Decode ( ~code;  "signature.png" )

).   thanks