abracadabraPDF › Forums › PDF – Général › Propriété d’un champ › Répondre à : Propriété d’un champ
Merci pour la réponse. Je viens essayer de mettre en application cela mais j’ai une erreur (dans le script de document CoulQ) : ce script devrait me permettre de choisir la couleur des champs question sur la 1ère page.
function CoulQ() {
var Coul=this.getField(“Menu.3″).value;
if (Coul==”Aucune”) {
for (var i=0; i<this.numFields; i++) {
if (this.getNthFieldName(i).indexOf(“question.”)==0) {this.getField(“question.”+i).fillColor = color.transparent;}
}
}
if (Coul==”Jaune”) {
for (var i=0; i<this.numFields; i++) {
if (this.getNthFieldName(i).indexOf(“question.”)==0) {this.getField(“question.”+i).fillColor = color.yellow;}
}
}
if (Coul==”Vert”) {
for (var i=0; i<this.numFields; i++) {
if (this.getNthFieldName(i).indexOf(“question.”)==0) {this.getField(“question.”+i).fillColor = color.green;}
}
}
if (Coul==”Bleu”) {
for (var i=0; i<this.numFields; i++) {
if (this.getNthFieldName(i).indexOf(“question.”)==0) {this.getField(“question.”+i).fillColor = color.blue;}
}
}
if (Coul==”Rouge”) {
for (var i=0; i<this.numFields; i++) {
if (this.getNthFieldName(i).indexOf(“question.”)==0) {this.getField(“question.”+i).fillColor = color.red;}
}
}
}