abracadabraPDF › Forums › PDF – Général › Un seul choix doit apparaître. › Répondre à : Un seul choix doit apparaître.
17 janvier 2019 à 00:02
#65110
Maître des clés
Bonjour
Le script est dans les cases à cocher.
La valeur affichée dans les champs TarifParchemin et TarifFeuille est leur « Valeur par défaut » (onglet Options), ce qui permet de la ré-afficher avec this.resetForm.
Parce-que this.resetForm ne supprime pas la valeur des champs, il les fait revenir à leur valeur par défaut (qui par défaut est « rien »).
:Smiley15:
Code:
if (event.target.value == 0) {
this.getField(« TarifParchemin2 »).textColor = color.ltGray;
this.getField(« TarifParchemin »).textColor = color.ltGray;
this.getField(« TarifParchemin »).value = « »;
this.getField(« TarifFeuille2 »).textColor = color.black;
this.getField(« TarifFeuille »).textColor = color.black;
this.resetForm(« TarifFeuille »);
}
else if (event.target.value == 1) {
this.getField(« TarifParchemin2 »).textColor = color.black;
this.getField(« TarifParchemin »).textColor = color.black;
this.resetForm(« TarifParchemin »);
this.getField(« TarifFeuille2 »).textColor = color.ltGray;
this.getField(« TarifFeuille »).textColor = color.ltGray;
this.getField(« TarifFeuille »).value = « »;
}
else {
this.getField(« TarifParchemin2 »).textColor = color.ltGray;
this.getField(« TarifParchemin »).value = « »;
this.getField(« TarifFeuille2 »).textColor = color.ltGray;
this.getField(« TarifFeuille »).value = « »;
}
this.getField(« TarifParchemin2 »).textColor = color.ltGray;
this.getField(« TarifParchemin »).textColor = color.ltGray;
this.getField(« TarifParchemin »).value = « »;
this.getField(« TarifFeuille2 »).textColor = color.black;
this.getField(« TarifFeuille »).textColor = color.black;
this.resetForm(« TarifFeuille »);
}
else if (event.target.value == 1) {
this.getField(« TarifParchemin2 »).textColor = color.black;
this.getField(« TarifParchemin »).textColor = color.black;
this.resetForm(« TarifParchemin »);
this.getField(« TarifFeuille2 »).textColor = color.ltGray;
this.getField(« TarifFeuille »).textColor = color.ltGray;
this.getField(« TarifFeuille »).value = « »;
}
else {
this.getField(« TarifParchemin2 »).textColor = color.ltGray;
this.getField(« TarifParchemin »).value = « »;
this.getField(« TarifFeuille2 »).textColor = color.ltGray;
this.getField(« TarifFeuille »).value = « »;
}
