Easy way to disable or enable field on button click

Im looking for advice on the best method to disable or enable all fields on a form.
It would be nice have a button or something that could just turn it on or off.

Do others instead have a form with editable fields and one without and switch ?

Im trying to determine the best “method” to achieve this where users can see info and then enable it to be edited if they have the correct privileges.

Any suggestions?

Thanks.

In general, there are two approaches. The first is to use a javascript to perform this action. The second is to use a Scriptcase macro. The disadvantage of the first solution is that you need to write javascript which I - personally - try to avoid. The downside of the second is that you have to write a lot of code since you must disable field-by-field. Perhaps someone else has a more ‘brighter’ idea…

Thank you so much for your reply @aducom !

I have also run into the issue of not being able to “disable” or make “readonly” select fields. Drop-Down Boxes… using the Scriptcase Macros sc_field_readonly({field2}, ‘on’); or sc_field_display({field2}, ‘on’);

Anyone else using a different method for this type of application?