Skip to main content
Question

How to change read-only form field from code?

  • April 20, 2018
  • 0 replies
  • 31 views

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!
This topic has been closed for replies.

  • Author
  • Registered
  • April 24, 2018
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.