Skip to content

Tips

Disabling the signature pad

By default, the signature library tries to find out if the record is in readonly mode or not and should make the pad editable or readonly.

There may be situations in which you would like to conditionally disable editing (or clearing) the signature, for example if a record has a certain state. In there cases you can lock editing:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// file: hooks/TABLENAME-dv.js
var options = {
    onReady: function(pad) {
        if (!pad.isEmpty()) {
            pad.lock();
        }
    }
};

var pad = new AppGiniHelperDVSignature.Pad("item_received_signature", options);

Inside onReady function, evaluate your conditions, for example if there is a signature already (see here), .lock() that pad.

See also