I'm trying to make a fillable form where the front desk reps fill out a certain portion of the form and then the form is sent to patients to sign and fill out. To avoid patients from editing what the front desk has filled out im trying to make a button that locks the fields to read only. I have the code to set the text field to read only but I would like the text fields to be editable again if the button is unchecked in case the front desk needs to go back and fix something. Is this possible? The code I have for the button to set it to read only is this.getField("FieldNameHere").readonly = true;
Thank you for any help!
Assuming it's a check-box field, and you've placed the script udner its Mouse Up event, you can adjust your code like this:
this.getField("FieldNameHere").readonly = (event.target.value!="Off");
Yes, it is a check-box field. Aplogies I should have been more clear. This worked perfectly!
Thank you for your help. I just have one more question. Is there a code that locks that check box button after it has been saved?
What has been saved? The file? If so, you should do it just before it's saved, not after.
this.getField("FieldNameHere").readonly = true;