abracadabraPDF › Forums › PDF – Général › Problème champs liés après duplication de pages › Répondre à : Problème champs liés après duplication de pages

As-tu adapté le nom du champ masqué dans le script ?
var nNumeroPage = this.getField(« stock.variable1« ).value;
this.getTemplate(« AEF_PB1_09-2017-modele »).spawn({nPage:nNumeroPage, bRename:true, bOverlay: false});
this.getField(« stock.variable1« ).value = this.getField(« stock.variable1« ).value +1;
Qu’on pourrait aussi bien écrire ainsi pour ne pas répéter le nom du champ inutilement :
var cNomChamp = this.getField(« stock.variable1« );
var nNumeroPage = cNomChamp.value;
this.getTemplate(« AEF_PB1_09-2017-modele »).spawn({nPage:nNumeroPage, bRename:true, bOverlay: false});
cNomChamp.value = Number(nNumeroPage) +1;