Text widget annotations: support multiline and read-only fields

Moreover, this patch provides us with a framework for handling field
flags in general for all types of widget annotations.
This commit is contained in:
Tim van der Meij 2016-09-14 16:32:51 +02:00
parent a7c35025fe
commit f6965fadc0
4 changed files with 76 additions and 7 deletions

View file

@ -446,9 +446,15 @@ var TextWidgetAnnotationElement = (
var element = null;
if (this.renderInteractiveForms) {
element = document.createElement('input');
element.type = 'text';
if (this.data.multiLine) {
element = document.createElement('textarea');
} else {
element = document.createElement('input');
element.type = 'text';
}
element.value = this.data.fieldValue;
element.disabled = this.data.readOnly;
if (this.data.maxLen !== null) {
element.maxLength = this.data.maxLen;