Is there a way to make a field impossible to edit? Possible with the addition of some javascript?
How to make a field uneditable?
Rob
#2
Hi @Andy2 you can disable a field using the following javascript (remember to wrap the code in script tags):
document.getElementById('FIELD ID HERE').disabled = true;
Could you let me know a bit more about your use-case for disabling a field? The above code will make it impossible to type in or change a field. If you’re looking to make sure a certain value in a form field stays intact a hidden field might be a more suitable option for you.
Andy2
#3
Hi Rob, thanks for the reply but I found a very simple workaround solution, which was just to place a see-through box over the field that I didn’t want to be editable. But thanks for this, this type of code is what I had in mind when I first posted here!