You are viewing limited content. For full access, please sign in.

Question

Question

Field rules and Multi Signatures

asked on June 10, 2014

I installed the multiple signature script on a form.  I then applied field rules to hide separate sections depending on what radio button is clicked.  When the field rules were applied to a section with the signatures, the signatures become unusable.  They shrink down in size to about 2 lines and you cannot put a signature on any of them.  If I take off the field rule to any section, the section I took it off of works fine, but the section that still has the rule applied still does not work.  Does anyone know a way around this?  Everything works great until I use the field rules on the sections.

 

0 0

Answers

APPROVED ANSWER
replied on June 10, 2014 Show version history

It looks it's not working because of how forms styles the elements it hides with field rules. By changing when you add the signature functionality to the form, you can resolve this issue.

 

The original code adds the signature to appropriate sections here:

 

$.getScript('http://lf.d93.k12.id.us/forms/js/jSignature.min.js', function () {
    $('.signature').jSignature();
});

Replace that with the following code that waits for the user to make a selection (student or staff) and then applies the signature functionality. #q11 is the selector for the radio button you're using.

 

$('#q11 input').click(function () {
    $.getScript('http://lf.d93.k12.id.us/forms/js/jSignature.min.js', function () {
        $('.signature').find('canvas').remove();
        $('.signature').jSignature();
    });
});

 

0 0
SELECTED ANSWER
replied on June 10, 2014

Thank you very much!!  That works great!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.