Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Problem protecting form field with "readonly"
  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.

Problem protecting form field with "readonly"

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


Joined: 23 Jul 2018
Points: 2
Post Options Post Options   Quote lamo Quote  Post ReplyReply Direct Link To This Post Topic: Problem protecting form field with "readonly"
    Posted: 23 Jul 2018 at 9:32am
Is the "readonly" for form fields supported with Foxit MobilePDF?
I am trying to get it working but no success. The field is still editable on my Android device.

What's wrong?

var v = this.getField("name");
v.readonly = true; 


Edited by lamo - 23 Jul 2018 at 9:40am
Back to Top
Sponsored Links


Back to Top
Jackie View Drop Down
New Member
New Member


Joined: 27 Sep 2013
Location: Melbourne Vic
Points: 13
Post Options Post Options   Quote Jackie Quote  Post ReplyReply Direct Link To This Post Posted: 14 Aug 2018 at 12:22pm
Is this any help to you?

this.getField("Interlocking Text System 3").readonly = true;
Jackie
Back to Top
lamo View Drop Down
New Member
New Member


Joined: 23 Jul 2018
Points: 2
Post Options Post Options   Quote lamo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Aug 2018 at 9:28am
Hi Jackie,
this is the command I am using already. ;-)

I want to proceed as following:

1. User enters fields in the form
2. User clicks SUBMIT button and the PDF should be attached to the email with protected fields.

This is the script I am using, before I submit the PDF.

for (var i = 0; i < this.numFields; i++) {
var fname = this.getNthFieldName(i);
if (fname!="INXMAIL" && fname!="SUBMIT" && fname!="SAVE PDF" && fname!="free") {
     this.getField(fname).readonly = true;
}}

SUBMIT Form - The PDF should be added to the email. Works fine but if I open the PDF the fields are not protected :-( By the way it works with Acrobat on my desktop pc. The protection doesn't work if I fill in the fields on my android smartphone.

What am I doing wrong?


Edited by lamo - 22 Aug 2018 at 9:28am
Back to Top
Jackie View Drop Down
New Member
New Member


Joined: 27 Sep 2013
Location: Melbourne Vic
Points: 13
Post Options Post Options   Quote Jackie Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 9:22am
Sounds like its your android smartphone not the code.

don't know anything about smart phones.  You need to check if the program you have on the phone is able to activate the code.
Jackie
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4101
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 30 Aug 2018 at 5:54pm
Mobile device PDF reader apps provide little JavaScript support for PDF forms. There many mobile devices that do not even support PDF forms.

For the Adobe Mobile Reader the readonly property appears not to be supported.

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.016 seconds.