These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Issue with order form...

logoz
Registered: Jul 9 2008
Posts: 8

I created an order form for our sales reps to be able to open and fill out in Reader.
The problem I have is that when they send this form to their customers, the customer
can also make changes to the form (I don't want that). So what do I need to do to
have the form accessible/editable by our reps (using standard Reader) but not by their
customers?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can create an "Protect Button" for example that uses JS for protection.

//Protect all fields
for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++)
{
var oFields = xfa.layout.pageContent(nPageCount, "field");
var nNodesLength = oFields.length;
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++)
{
oFields.item(nNodeCount).access = "protected";
}
}With a "Reopen Button" that asking for a password you can allow editing only for your sales reps.

//Ask for password
var cRtn = app.response("Password requiered to edit this form:", "Staus: Protected.");
if(cRtn == "1234567890")
{
// Open all fields
for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++)
{
var oFields = xfa.layout.pageContent(nPageCount, "field");
var nNodesLength = oFields.length;
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++)
{
oFields.item(nNodeCount).access = "open";
}
}}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs