Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
Disable fields in subsequent instances of a page/subform

I have a (mainly) single page XFA document with various fields to be filled out by the user. I am adding a button with a script at the bottom of the page to duplicate the page after the user has completed it. Once duplicated, all the data from Page 1 is populated to the respective fields on Page 2 using global binding, except for one particular field which will require the user's input on each subsequent page.

I want to be able to loop through all the fields on each new instance of the first page (except the one particular field) and make their access 'readOnly', I just don't know the best or most efficient way to tackle it!

Here is an example of my thought process:

for (var nPageCount = 1; 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 = "readOnly";
    }
    xfa.resolveNode("form1.mainPage["+nPageCount+"].Subform7.DropDownList.Background.Search").access = 'open';
    xfa.resolveNode("form1.mainPage["+nPageCount+"].Subform7.DropDownList.Results.ResultList").access = 'open';
}

I placed the above code in the indexChange event in both 'form1' and 'mainPage' but neither worked. Any ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!