Creating the Multiple Signatures on a Form ------------------------------------ 1. Open a form in Laserfiche Forms. 2. Create a Collection, that will include all of the signature fields. Under the Advanced tab, give it the sigCollection class. 3. On the Edit page, add a multi-line field called sig data. In the Advanced tab, give it the sigdata class. 4. Under the collection, add a custom html field. In the advanced tab add the sigGroup class. In the basic tab, ensure that you are looking at the HTML view in the rich-text editor by clicking the HTML button. In the HTML view, you should see HTML tags like

. Paste the following code into the rich-text editor:


5. Add another custom HTML field. In the advanced tab, add the sigGroup class. In the basic tab, ensure that you are looking at the HTML view in the rich-text editor and paste the following:

6. Add another custom HTML field. In the basic tab, ensure that you are looking at the HTML view in the rich-text editor and paste the following:
7. Add another Custom HTML field. In the basic tab, ensure that you are looking at the HTML view in the rich-text editor and paste the following:

You must sign this form before submitting.

8. On the CSS and JavaScript page, paste the following code in the JavaScript section: function htmlEncode(value) { return $('
').text(value).html(); } function htmlDecode(value) { return $('
').html(value).text(); } $.getScript('https://prodocs4530/jSignature.min.js', function () { $('.signature').jSignature(); }); /**When the page loads, check if the sig data (hidden) field has a value. If it has a value, decode it and put it in the image, and remove the signature pad and its buttons.**/ $('.sigCollection').each(function () { var sigvalue = $(this).find('.sigdata textarea').text(); var sigrovalue = $(this).find('.sigdata .ro').text(); if (sigvalue != '' || sigrovalue != '') { var decoded = htmlDecode(sigvalue == '' ? sigrovalue : sigvalue); var $img = $(''); $img.attr("src", decoded).appendTo($(this).find('.sigimage')); $(this).find('.sigGroup').remove(); //class added to the signature button and image custom HTML fields. $(this).find('.sigwarning').hide(); } }); $('.donebutton').click(function () { var section = $(this).closest('.sigCollection'); var sigdata = section.find('.signature').jSignature('getData'); section.find('.sigdata textarea').val(htmlEncode(sigdata)); var $img = $(''); $img.attr("src", section.find('.signature').jSignature('getData')).appendTo(section.find('.sigimage')); section.find('.sigGroup').remove(); //class added to the signature button and image custom HTML fields. }); $('.clearbutton').click(function () { var section = $(this).closest('.sigCollection'); section.find('.signature').jSignature('clear'); }); 9. In the line that starts "$.getScript..." replace formsServerURL with the name of the Forms Server machine. 10. In the CSS section of the CSS and JavaScript page, add the following rule: .sigdata{display:none;}