Hello,
I need to remove all signatures from a form when it moves from one view state to a "rework" view state.
this is my code fragment so far (doesn't work!) based on other posts I found in the forums.
function dooButton::OnClick(eventObj)
{
var oSignedDataBlocks = XDocument.SignedDataBlocks;
var count = oSignedDataBlocks.Count;
if( count <= 0 )
{
return;
}
XDocument.UI.Alert( oSignedDataBlocks.Count + " signature blocks." );
var i = 0;
for( var i = 0; i < count; i++ )
{
var oSignedDataBlock = oSignedDataBlocks.Item( i );
if( oSignedDataBlock != null )
{
if( oSignedDataBlock.Signatures != null )
{
if( oSignedDataBlock.Signatures[0] != null )
{
var oSignatureNode = oSignedDataBlock.Signatures[0].SignatureBlockXmlNode;
if( oSignatureNode != null )
{
oSignatureNode.parentNode.removeChild( oSignatureNode );
}
}
}
}
}
}