pdf: get all fields and set to read only


/ Published in: JavaScript

set all fields to read only in a for-loop,


Copy this code and paste it in your HTML
  1. // for PDF: array from all fields and set to read only
  2. for (var i=0; i<this.numFields; i++) {
  3. var f = this.getField(this.getNthFieldName(i));
  4. if (f.type != "button") {
  5. f.readonly = true;
  6. // console.println("i");
  7. }
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.