Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda