Bug in contractme.js: signature, printed name, and date not saved on signed waivers

Cindy B. shared this question 6 hours ago
Answered

here is a new lead ID that I am referencing today....


#71711415

I have tested the FIREWORKS and OVERNIGHT WAIVERS again today as it has been 39 days since I started asking for help on this. It is still letting me sign, then wiping out the signature and date info and storing as a BLANK but SIGNED waiver on the IO office lead.

Out of desperation, I turned to AI to see if I could fix this problem even though THEY ARE WAIVERS THAT IO FURNISHED to users themselves. However, AI confirmed that THIS IS SOMETHING THAT IO NEEDS TO FIX, AND NOT ME.

Here is what it found....

I'm reporting a bug in your platform's waiver-signing code that is causing signed waivers to lose the customer's signature, printed name, and date. This is a bug in your hosted script, not in my WordPress site or document template, and needs to be fixed on your end.


Summary of the issue:

When a customer signs a waiver, the document center shows the waiver as "Signed," but the signature, printed name, and signed date fields are all blank when the document is viewed or printed.


Root cause (found in contractme.js):

In the sign_contract() function, the signature data is captured like this:


var signature = jQuery("#signature").jSignature("getData","svgbase64");


jSignature's getData("svgbase64") returns a two-element array (a MIME-type/encoding prefix, and the base64 payload) rather than a plain string. The code then does:


jQuery('[name=signature_data]').val(signature);


Passing that array directly into .val() causes jQuery to call the array's default toString(), which joins the two elements with a comma. Since the first element already ends in a comma, the resulting value has a double comma and is not a valid data URI, e.g.:


image/svg+xml;base64,,PHN2ZyB4bWxucz0i...


This malformed value is what actually gets submitted in the signature_data hidden field.


Why this likely also wipes the printed name and date:

The printed name and signed date are never separately confirmed to be missing on the front end — they're present and correctly filled in by the customer at signing time. My working theory is that your server-side save process fails when it tries to parse or decode the malformed signature_data value, and if that save is wrapped in a single transaction, the entire submission (signature, printed name, and server-stamped date) fails to write — while the front-end "Signed" status appears to be set independently of whether that save actually succeeded, so the customer sees a success confirmation even though nothing was saved.


Suggested fix:

In sign_contract(), the array returned by getData("svgbase64") should be joined properly before being assigned to the hidden field, e.g.:


var signature = jQuery("#signature").jSignature("getData","svgbase64").join('');


or explicitly signature[0] + signature[1], rather than relying on the array's implicit toString().


I'd appreciate confirmation that this is being looked at, along with an ETA for a fix, since customers currently believe they've signed a binding waiver when in fact no signature, name, or date is being retained.

I've already provided many screenshots but let me know if you need me to send anything else. You can see all the screenshots submitted under this topic

6736a598032377008d9748c668449002

Comments (1)

photo
1

The expected behavior for waivers is that a waiver can be signed multiple times by different people. After a waiver is signed, the page refreshes and displays a confirmation that the signature was successfully completed. The waiver itself remains available for additional signatures, so it is normal to continue seeing the waiver after it has been signed.

To view the signed waivers, click Signed on the Documents section of the lead.


f32dd5f98f638445df0907eee84df830

You will be redirected to the signed waivers page, where you can see all completed waivers associated with that lead. You can open and review any individual waiver by clicking on it.


ffed3373e7b7aaaa4026ffb6c9391bdc

You will be redirected to the signed waivers page, where you can see all completed signatures associated with that waiver on the lead. A lead can have multiple waivers, and each waiver can have multiple signed entries. You can open and review any individual signed waiver by clicking on it.

Leave a Comment
 
Attach a file