Hi,
In my form I have a signature box where I want the user to enter their initials and another box where the user needs to put in their signature. I have the following code:
$(document).ready(function(){ $("#sigNav a:eq(1)").hide(); $("#form-signature-dlg").on("shown.bs.modal", function(){$("#sigNav a:eq(0)").click(); }); /*Initial instead of Signature*/ $(document).ready(function(){ /*Initial button label*/ $('.myInit').find(".Sign_Sig").val("Initials"); /*Initial modal header*/ $('#form-signature-dlg > div > div > div.modal-header > div').text('Initial Document'); /*Prompt text in the "Type" field*/ $('#typeSignature').attr('placeholder','Type your initials here'); }); /*Signature instead of Initial*/ $(document).ready(function () { /*Signature button label*/ $('.mySign').find(".Sign_Sig").val("Signature"); /*Signature modal header*/ $('#form-signature-dlg > div > div > div.modal-header > div').text('Sign Document'); /*Prompt text in the "Type" field*/ $('#typeSignature').attr('placeholder','Sign here'); }); });
As I understand it, the first lines hide the "Draw" option from the Signature/Initial boxes. the second section ".myInit" changes the dialog box to "Initials", changes the modal box to "Initial Document" and the placeholder to "Type your Initials Here". the third section does the same for the signature box (using different entries).
the problem is I can't make it work. the modal headers don't change and the placeholders are the same for both dialog boxes, so I get this when I click the "Signature" box or the "Initials" box:
as shown above #q17 is the Signature box with the class "mySign" & #q18 is the initial box with the class "myInit" (no quotes)
Any help with making all of this work is greatly appreciated.