Highlighted

PDF Form PLEASE HELP

Avatar

Guest

09-02-2009

I'm having a problem with securing specific fields. Not sure if that can be done. I have a form that I created in LiveCycle Designer and the forms contains fields that create a basic calculation for example (Qty+Price=Total). I want those fields to be field out by our sales people and I want them to save the form with the info. field in and email to customer as a quote basically, but I don't want the customer to be able to change those numbers, but I do want the customer to fill in other portions of the field. Having a problem doing this cause Acrobat is only letting me secure the whole form and not just portions. Is there a way to only secure portions of a form. Please help ASAP.

Replies

Highlighted

gkaiseril

09-02-2009

Yes, but you will need to use a folder level JS to access the identity object and then for the authorized identities you could unlock the fields. You will still need to keep the form locked or a user with LCD could disable your controls.
Highlighted

gkaiseril

10-02-2009

You need to create a folder level JavaScript to obtain the identity's object properties during the initialization of the application. This code will need to be included on each salesman system. You can even create your own identity property. You will also have to have all your salesman complete the identity options for their version of Acrobat/Reader



You will also need to create a form ready script to check a selected identity property, like the 'corporation'. You can check this value to see if it matches your corporation value or your selected value. This document ready script can then lock or unlock the fields bases on the results of your test. Users outside of your organization will not have the folder level script, so be prepared to trap this error, or they will not have the same corporation property.



The following JavaScript code defines a trusted function to obtain the passed identity property:



// folder level JavaScript to obtain the properties from the identity object

trustedIdentity = app.trustedFunction( function (sProperty) {

// function to return the passed identity property

var iProperty = '';

app.beginPriv(); // explicitly raise privilege

iProperty = identity[sProperty];

app.endPriv();

return iProperty;

}) // end of trustedIdentity function definition



The following code shows how to obatin the various properties in a PDF form.



// JavaScript to use the trustedIdentity function:

// get value of 'corporation' property by calling the 'trusetedIdentity' function

var myCorportaion = trustedIdentity('corporation');

console.println('corporation: ' + myCorporation); // display result

console.println('email: ' + trustedIdentity('email') ); // get email

console.println('loginName: ' + trustedIdentity('loginName') ); // get login name

console.println('name: ' + trustedIdentity('name') ); // get name