Masquer 1 champ sous condition formulaire pdf

Utilisateur anonyme -  
 Utilisateur anonyme -
Bonjour,

J'ai fais un formulaire PDF, je voudrai masquer un champ texte en fonction d'un autre champ.

Par exemple, 2 champs : "montant" et "total"

Si champ "montant" =0 alors champ "total" masquer.

Il me semble que c'est possible mais je n'y arrive pas.

J'ai des trucs comme ci-dessous mais ....

var f = this.getField("total");  
f.hidden = (event.value < 100);  
event.value = util.printf("$ %.2f", event.value);  


Merci d'avance pour vos réponses

Yaloo

1 réponse

  1. Utilisateur anonyme
     
    Bonsoir,

    Si ça intéresse qq'un voici :
    if (event.target.value == "") {
    this.getField("Champ 1").hidden = false;
    this.getField("Champ 2").hidden = false;
    this.getField("Champ 2").hidden = false;

    }else {
    this.getField("Champ 1").hidden = true;
    this.getField("Champ 2").hidden = true;
    this.getField("Champ 3").hidden = true;
    }

    A+ Yaloo
    2