Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Need a JavaScript to enable/view Multi-line option
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Need a JavaScript to enable/view Multi-line option

 Post Reply Post Reply
Author
Abhijith View Drop Down
New Member
New Member


Joined: 13 Sep 2013
Points: 1
Post Options Post Options   Quote Abhijith Quote  Post ReplyReply Direct Link To This Post Topic: Need a JavaScript to enable/view Multi-line option
    Posted: 13 Sep 2013 at 9:11am
Hello All,
 
I need a JavaScript to enable/view Multi-line option for all the Text fields in PDF Form.
 
Assume that I have a PDF form of Fields from F1 to F100 and it contains 25 Checkboxes, 25 Combo Box and 50 Text Fields. Now i need a javascript for which i need to enable Multiline for only Text Fields. So Is there any JS for which i can enable the Multiline option for only Text fields and not for ComboBox or Checkbox.
Back to Top
Sponsored Links


Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4106
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2013 at 3:32pm
There is no multiline option for any field except text fields. So you will have to test the field type for a type of "text". Trying to access a property that is not available to a given object may cause an error or have no effect on the object.
 
// define some processing variables;
var oField; // field object
// loop through each of the fields
for(i = 0; i < this.numFields; i++) {
// get the i field name object
if(oField.type == "text") {
} // end field type text;
} // end i field processing;
 
You can run this code in the JavaScript console.
 
Prior planning might have prevented this. There will be situations where you cannot use JavaScript to adjust the PDFs.


Edited by gkaiseril - 13 Sep 2013 at 3:33pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.