Tag Archives: quickhacks

Quick Hack: Make readonly form elements writeable in Chrome

A quick and dirty hack to allow editing of readonly form fields from within Chrome.  Probably works similarly in other browsers (Firefox, Internet Explorer, Edge)

  1. Open the js console (F12 then choose the tab “Console”)
  2. Select the context as appropriate from the dropdown (that’s the frame in which the form exists)
  3. Paste the following in the console:

    elements = document.getElementsByTagName('input');
    for(var i=0; i<elements.length; i++) {
    elements[i].readOnly=false;
    }

Footnotes:

  • Adapt for “disabled” elements by replacing “readOnly” with “disabled”
  • You may also need to set “editable” to true