Copy link to clipboard
Copied
Bonjour,
Je cherche un script pour interdire la saisie d'un champs "textbox" si la case à cocher (radio button) précédente à retourner la valeur "non", à l'inverse, permettre la saisie du champ, si la valeur du "radio button" a été cochée "oui". Je travaille avec Acrobat DC, donc j'ai besoin d'un code Javascript.
merci !
Copy link to clipboard
Copied
Use this code as the MouseUp event of both radio-button fields:
var otherField = this.getField("Text1");
if (event.target.value=="yes") {
f.readonly = false;
} else {f.value = "";
f.readonly = true;
}
Copy link to clipboard
Copied
Merci,
Entretemps, j'ai trouvé ce code et ça fonctionne comme voulu !
if (this.getField("vaccin1").isBoxChecked(0))
{this.getField("Text1").display=display.visible;}
else
{this.getField("Text1").display=display.hidden;}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now