I am using this plugin.
My application submits signature with ajax call. On a succesful ajax return I want to disable any signature changes by user. The last thing I tried is a following, but the signature pad is still active and drawing lines (listeners afe not detached):
function showResponse(itemJson, statusText, xhr, $form) {
if (itemJson.status == 'success') {
debugger;
$($form.find('.clearButton')).remove();
$($form.find('button')).remove();
$form.find('input').attr('readonly', 'readonly');
var api = $form.signaturePad();
var sig = api.getSignatureString();
api.updateOptions({displayOnly: true})
// $form.signaturePad({displayOnly: true}).regenerate(sig);
}
}
Does anyone know how to update existing signaturePad, so it turns into disabled mode ?
Usually i use:
api.off();
It works in my software
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With