How to change read-only form field from code?

  • 0
  • 1
  • Question
  • Updated 12 months ago
I have a form with a lot of signature fields.  Basically the user checks a box and it populates a field with their name and date/time stamp as an electronic signature.  The signature field is read-only on the form, and a rule is in place for each to act when the checkbox is changed.  Works, great, except I want to reduce the number of rules and use them for other purposes.  So, I added the IOL technique, which works if the signature field is not set to read-only.  Is there a way to change a read-only form field from the IOL Javascript?   Thanks!
Photo of Ken

Ken

  • 170 Points 100 badge 2x thumb

Posted 12 months ago

  • 0
  • 1
Photo of Ken

Ken

  • 170 Points 100 badge 2x thumb
Just a little more info on this.  Field #26 is the checkbox, and #17 is a text field to hold the signature.  Here's a piece of the code:

  // Project Manager Signature
  $("#_fid_26").change(function() {
    if($("#_fid_26").is(":checked")) {
     $("#_fid_17").val("Signature Text");
    }else{
     $("#_fid_17").val("");
    }
  });   

As long as the signature field (#17) is not set to read only, it works fine.  When set to read-only it doesn't work.