I figured it out. So, in the javascript below, imgSource represents the single line text field that I am populating with the image source of the signature, when the form is signed. Then I build the image preview "Div" tag, and insert it into the existing signature Div tag. I also have to remove manually some required field attributes, so that I can submit the form. But, it seems to work and I am actually getting the signature to save to the repository like I want it to.
function displaySignature(imgSource) {
var sigdata = $("#" + imgSource.id + " input").val();
if (sigdata!="") {
// locate the Signature field and hide it and make it not required
var sigElement = imgSource.previousSibling;
var divElement = sigElement.querySelector('div[class="clearfix"]');
var el = divElement.children[1];
var imgPreview = '<div class="form-sig-preview"><img class="form-sig-img" src="' + sigdata + '"><a href="javascript: void(0)" title="Delete" class="form-sig-remove lfi-times" style="padding:0 5px 0 0;font-size:130%">×</a><a href="javascript: void(0)" title="Edit" class="form-sig-edit lf-icon-signature"></a></div>';
if (el.tagName != 'DIV')
{
$(imgPreview).insertAfter(divElement.children[0]);
}
var sigUrlInput = sigElement.querySelector('input[autocomplete="nope"]');
sigUrlInput.removeAttribute("required");
var sigButton = sigElement.querySelector('input[type="button"]');
sigButton.classList.add("hidden");
sigButton.removeAttribute("required");
}
}