Skip to main content
Participant
March 17, 2021
Answered

Read only button toggle

  • March 17, 2021
  • 1 reply
  • 1997 views

Hello all,

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!

This topic has been closed for replies.
Correct answer try67

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");

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 17, 2021

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");

Athens0Author
Participant
March 17, 2021

Yes, it is a check-box field. Aplogies I should have been more clear. This worked perfectly!

 

Thank you!