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?
//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